Tuesday, 22 September 2020

LetsEncrypt On Amazon Linux2 + Apache

 

Install Certbot


#change to our home directory
cd

# Download and install the "Extra Packages for Enterprise Linux (EPEL)"
wget -O epel.rpm nv https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y ./epel.rpm

# Install certbot for Apache (part of EPEL)
sudo yum install python2-certbot-apache.noarch

# Create a dummy ssl certificate. This will not become part of your ssl strategy. 
# You only need to install it because of default settings in Apache ssl configuration
sudo /etc/pki/tls/certs/make-dummy-cert localhost.crt
sudo service httpd restart


2. Execute certbot

# Launch the certbot installer with the following parameters:
#     -i apache                     Use the Apache installer.
#     -a manual                     Authenticate domain ownership manually.
#     --preferred-challenges dns    Use DNS TXT records for authentication challenge.
#     -d test.example.com           Specify the domain for the SSL/TLS certificate.
sudo certbot -i apache -a manual --preferred-challenges dns -d ssl.example.com

Sunday, 19 July 2020

Run Chrome browser without CORS

Windows

Just do follow steps:
  • Right click on desktop, add new shortcut
  • Add the target as "[PATH_TO_CHROME]\chrome.exe" --disable-web-security --disable-gpu --user-data-dir=~/chromeTemp
  • Click OK.
NOTE: On Windows 10 command will be: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --disable-gpu --user-data-dir=~/chromeTemp

OSX

open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security

Linux

google-chrome --disable-web-security
If you need access to local files for dev purposes like AJAX or JSON, you can use -–allow-file-access-from-files flag.

Thursday, 16 July 2020

GIT: list all branch creator name and creation date

 git for-each-ref --format='%(color:cyan)%(authordate:format:%m/%d/%Y %I:%M %p)    %(align:25,left)%(color:yellow)%(authorname)%(end) %(color:reset)%(refname:strip=3)' --sort=authordate refs/remotes