This file contains 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
# Update you packages | |
sudo apt-get update | |
# Install a compiler | |
sudo apt-get install build-essential | |
# Install tcl | |
sudo apt-get install tcl8.5 | |
# Download Redis | |
wget http://download.redis.io/releases/redis-stable.tar.gz | |
# Uncompress archive | |
tar xzf redis-stable.tar.gz |
This file contains 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
# Clone repo | |
git clone https://github.com/prerender/prerender.git | |
cd prerender | |
npm install | |
npm install prerender-redis-cache --save | |
# Modifi .htaccess (Middleware in prerender vocabulary | |
https://gist.github.com/thoop/8072354 | |
# Open firewall port |
This file contains 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
# PHP mail change FROM (when auto set as www-data by web server) | |
mail([to], [subject], [message], [headers], "-f hugo@maugey.fr -F Hugo Maugey"); |
This file contains 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
# Export first database | |
mysqldump --skip-comments --skip-extended-insert -u root -p database_1>file1.sql | |
# Export second database | |
mysqldump --skip-comments --skip-extended-insert -u root -p database_2>file2.sql | |
# Display differences between files | |
diff file1.sql file2.sql | |
# Ressource | |
http://www.mysqldiff.org/ |
This file contains 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
# https://letsencrypt.org/getting-started/ | |
# clone and run program | |
git clone https://github.com/letsencrypt/letsencrypt | |
cd letsencrypt/ | |
./letsencrypt-auto --help | |
./letsencrypt-auto --verbose --debug | |
./letsencrypt-auto renew --dry-run | |
./letsencrypt-auto renew |
This file contains 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
# See all opened ports | |
netstat -ntlp | grep LISTEN | |
# | |
netstat - anp | |
# | |
netstat -tulpen | |
# Show uwf status | |
sudo ufw status verbose | |
# Open a port | |
sudo ufw allow 80/tcp |
This file contains 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
scrapyd start <crawler> |
This file contains 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
[DEFAULT] | |
ignoreip = 127.0.0.1/8 YOUR_IP | |
banaction = ufw | |
bantime = 1800 | |
destemail = your.name@mail.com | |
sendername = Fail2Ban | |
action = %(action_mwl)s | |
[sshd] | |
enabled = true |
This file contains 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
# Install tailon | |
pip install tailon | |
# start tailon | |
tailon -f /var/log/apache2/{access,error}.log | |
tailon -f /var/log/apache2/{access,error}.log -b 127.0.0.1:8080 -d | |
# SECURE INSTALLATION | |
# Create a domain or subdomain like tailon.mydomain.com | |
# Create an apache virtual host |
This file contains 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
# PIP | |
# install package | |
pip install package | |
# install from git repository | |
pip install git+git://github.com/gvalkov/tailon.git |
NewerOlder