Skip to content

Instantly share code, notes, and snippets.

@evansmwendwa
Last active May 29, 2018 20:15
Show Gist options
  • Save evansmwendwa/2b97bdb717783773ac4d97fe961cf3ee to your computer and use it in GitHub Desktop.
Save evansmwendwa/2b97bdb717783773ac4d97fe961cf3ee to your computer and use it in GitHub Desktop.
Add Random Password Generator

Installing latest git

down vote accepted Use the PPA from the maintainers of git on Ubuntu:

sudo apt-add-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git

https://askubuntu.com/questions/568591/how-do-i-install-the-latest-version-of-git-with-apt/568596

Symlink

To create a new symlink (will fail if symlink exists already):

ln -s /path/to/file /path/to/symlink

To create or update a symlink:

ln -sf /path/to/file /path/to/symlink

Nginx Setup and Let's Encrypt SSL

https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04 https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-16-04 https://help.dreamhost.com/hc/en-us/articles/222784068-The-most-important-steps-to-take-to-make-an-nginx-server-more-secure

Getting Started with PostgreSQL on Mac OSX

https://www.codementor.io/devops/tutorial/getting-started-postgresql-server-mac-osx

Virtualenv on Mac

http://sourabhbajaj.com/mac-setup/Python/virtualenv.html

Install Python 2.7, virtualenv and virtualenvwrapper on OS X Mavericks/Yosemite

http://www.marinamele.com/2014/05/install-python-virtualenv-virtualenvwrapper-mavericks.html

Install PHPMyAdmin from Github

https://laracasts.com/discuss/channels/servers/phpmyadmin-on-forge

git clone --depth=1 --branch=STABLE git://github.com/phpmyadmin/phpmyadmin.git

Then add this to your default site/vhost

location /phpmyadmin {
    index index.php;
    auth_basic "Login";
    auth_basic_user_file /some/path/authbasic_mysql;
}

Optional (setup cron to update it daily)

pma_update.sh

#!/bin/bash
cd /some/path/to/phpmyadmin/
git pull -q origin STABLE

crontab -e

Upgrade Script

# Automatically upgrade phpMyAdmin daily (12am)
0 * * * * /path/to/pma_update.sh >/dev/null

Mac/Unix Random Security token in terminal (Random Password Generator)

openssl rand 30
openssl rand -hex 30

Runcloud Nginx

https://runcloud.io/docs/cheat-sheet/nginx.html

@evansmwendwa
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment