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
| netstat –lp —inet |
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
| # User 'pete' | |
| sudo useradd -d /home/pete -m pete | |
| sudo passwd pete | |
| usermod -a -G www-data deployuser | |
| mkdir /var/www/whatever | |
| chown -R deployuser:www-data | |
| # Create key on server & add to repo user |
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
| sudo adduser pete sudo |
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
| server | |
| { | |
| listen 443; | |
| ssl on; | |
| ssl_certificate /usr/ssl/server.crt; | |
| ssl_certificate_key /usr/ssl/server.key; | |
| ... | |
| access_log /var/log/nginx/site.access.log; |
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
| echo '[http] sslverify = false' >> ~/.gitconfig |
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
| #LIST PORT ACTIVITY | |
| lsof -i :443 | |
| lsof -i :8080 | |
| lsof -i :80 | |
| #etc... |
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
| crontab -e |
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
| SELECT | |
| fielda, fieldb | |
| FROM | |
| tbla | |
| INTO OUTFILE | |
| '/tmp/data.csv' | |
| FIELDS TERMINATED BY | |
| ',' | |
| ENCLOSED BY | |
| '"' |
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
| mysqldump -u root -p MYDBNAME > filename.sql |
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
| sudo update-alternatives --config javac |
OlderNewer