sudo yum install epel-release
sudo yum update
sudo yum install certbot
sudo yum install nginx
sudo systemctl start nginx
| Backup: | |
| docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql | |
| Restore: | |
| cat your_dump.sql | docker exec -i your-db-container psql -Upostgres |
| public class ASCIIFolding { | |
| @NonNull | |
| public static String foldToASCII(@NonNull String input) { | |
| return foldToASCII(input, new StringBuilder(input.length())); | |
| } | |
| @NonNull | |
| public static String foldToASCII(@NonNull String input, @NonNull StringBuilder sb) { | |
| final int end = input.length(); |
#Angular-cli oh shit!
https://cli.angular.io/reference.pdf
| Commands | Description |
|---|---|
| ng help | returns all commands with flags they can take as a param |
| ng new [project-name] | create a brand new angular project with live server BANG! |
| ng init | grabs name from folder that already exist |
| ##OSX | |
| ## Lsof or list open files | |
| lsof -n -i4TCP:8085 | grep LISTEN | |
| ##CentOS | |
| ##netstat or network tools | |
| ##$PORT is port of choice | |
| netstat -ln |grep $PORT |
| // Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
| // See also: http://www.paulund.co.uk/change-url-of-git-repository | |
| $ cd $HOME/Code/repo-directory | |
| $ git remote rename origin bitbucket | |
| $ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
| $ git push origin master | |
| $ git remote rm bitbucket |
| worker_processes 5; | |
| error_log /var/log/nginx/error.log; | |
| pid /var/log/nginx/nginx.pid; | |
| worker_rlimit_nofile 8192; | |
| events { | |
| worker_connections 4096; | |
| use epoll; |
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf
File locations:
nginx.conf to /usr/local/etc/nginx/default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-availablehomebrew.mxcl.nginx.plist to /Library/LaunchDaemons/Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)