This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #cd /etc/caddy/Caddyfile | |
| example.com { | |
| root /usr/share/nginx/html | |
| gzip | |
| log /var/log/caddy/access.log | |
| #fastcgi / unix:/var/run/php-fpm/php-fpm.sock php # Fast CGI php interpreter | |
| #fastcgi / fastcgi / 127.0.0.1:9000 php # Fast CGI php interpreter | |
| #using with laravel | |
| fastcgi / unix:/var/run/php-fpm/php-fpm.sock php { | |
| index index.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ###################### | |
| ## shadowsocks-libev | |
| ###################### | |
| # install dependencies | |
| yum install epel-release -y | |
| yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto udns-devel libev-devel -y | |
| # install shadowsocks-libev | |
| cd /etc/yum.repos.d/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is just a cheat sheet: | |
| # On production | |
| sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
| # On local | |
| scp -C production:~/database.sql.gz | |
| dropdb database && createdb database | |
| gunzip < database.sql.gz | psql database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Idea taken from https://gist.github.com/jackcarter/d86808449f0d95060a40 | |
| # This script requires python lib: requests | |
| # You can install by: `python -m pip install requests` | |
| import time | |
| import codecs | |
| import requests | |
| reader = codecs.getreader("utf-8") |
OlderNewer