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
A good system: | |
Good Systems are | |
unattended | |
bootstrapping | |
visible | |
robust | |
recoverable | |
safe |
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 pylint pyflakes pep8 mccabe | |
pip install pylint pyflakes pep8 mccabe | |
pip install pylint pyflakes pep8 mccabe |
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
#BASH: find out the disk usage of the directories (only the directories) within your current directory/current working directory, | |
for x in `ls -l|grep ^d|awk '{print $8}'`; do echo $x; du -ch ./$x | tail -n 1; done | |
for x in `ls -l|grep ^d|awk '{print $8}'`; do echo $x; du -ch ./$x | tail -n 1; done | |
for x in `ls -l|grep ^d|awk '{print $8}'`; do echo $x; du -ch ./$x | tail -n 1; done |
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
#PIL/Pillow Fully Loaded | |
10 pip install Pillow | |
9 pip uninstall Pillow | |
8 sudo apt-get install libjpeg-turbo8 libjpeg-turbo8-dev | |
7 sudo apt-get install libjpeg-dev | |
6 sudo apt-get install libfreetype6 libfreetype6-dev | |
5 sudo apt-get install zlib1g zlib1g-dev | |
4 sudo apt-get install libtiff5 | |
3 sudo apt-get install libwebp4 libwebp-dev |
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
for filename in `/usr/bin/find . -iname "*py"`; do echo $filename; /bin/echo $filename | /usr/bin/awk '{print "../../PATH_TO_DUPLICATE_PROJECT_DIRECTORY/"substr($1, 3, 999)}' | /usr/bin/xargs /usr/bin/diff -y -q $filename ; read -n1 -r -p "Press any key to continue..." key; done | |
for filename in `/usr/bin/find . -iname "*py"`; do echo $filename; /bin/echo $filename | /usr/bin/awk '{print "../../PATH_TO_DUPLICATE_PROJECT_DIRECTORY/"substr($1, 3, 999)}' | /usr/bin/xargs /usr/bin/diff -y -q $filename ; read -n1 -r -p "Press any key to continue..." key; done | |
for filename in `/usr/bin/find . -iname "*py"`; do echo $filename; /bin/echo $filename | /usr/bin/awk '{print "../../PATH_TO_DUPLICATE_PROJECT_DIRECTORY/"substr($1, 3, 999)}' | /usr/bin/xargs /usr/bin/diff -y -q $filename ; read -n1 -r -p "Press any key to continue..." key; done | |
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
for x in `ls|grep tsv`; do gzip --best --stdout $x >> $x.gz; rm -vf $x 1>> cleanup.log 2>> cleanup.log; done | |
for x in `ls|grep tsv`; do gzip --best --stdout $x >> $x.gz; rm -vf $x 1>> cleanup.log 2>> cleanup.log; done | |
for x in `ls|grep tsv`; do gzip --best --stdout $x >> $x.gz; rm -vf $x 1>> cleanup.log 2>> cleanup.log; done | |
for x in `ls|grep tsv`; do gzip --best --stdout $x >> $x.gz; rm -vf $x 1>> cleanup.log 2>> cleanup.log; done |
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
## iptables snippet ## | |
# Get current iptables list with line numbers | |
/usr/bin/sudo /sbin/iptables --line-numbers -L | |
# Add a rule to the INPUT chain, append it to the end | |
/usr/bin/sudo /sbin/iptables -A INPUT -p tcp --dport 12345 -j ACCEPT | |
# Insert a rule to the INPUT chain, before the line number 7 | |
/usr/bin/sudo /sbin/iptables -I INPUT 7 -p tcp --dport 12345 -j ACCEPT |
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
# HOW TO DO A REVERSE SSH TUNNEL CONNECTION | |
# how_to_do_a_reverse_ssh_tunnel_connection.txt | |
$ ssh -i ./cloud.key -p [CLOUD_SERVER_SSH_PORT] -R [TUNNEL_PORT]:localhost:[LOCAL_SSH_PORT] user@[CLOUD_SERVER] | |
$ /usr/bin/ssh -i ./cloud.key -p 22 -R 6543:localhost:22 user@hostname.cloud.vps.provider.net |
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
# HOW TO FIND OUT WHICH PORT WAS USED FOR A REVERSE TUNNEL | |
# how_to_find_out_which_port_was_used_for_a_reverse_tunnel | |
# | |
# | |
# How to get a list of ports to a specific host that [the host that you are currently logged into] is currently connected to. | |
# | |
# Exposition: | |
# | |
# So I have a "client's server" [somewhere] that I keep a SSH tunnel running on, this is a persistent SSH reverse | |
# tunnel to my "vps/cloud server" on one my VPS providers. |
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
mkdir ytdl | |
cd ytdl/ | |
curl https://yt-dl.org/downloads/{LATEST_VERSION}/youtube-dl -o ytdl | |
chmod a+x ./ytdl | |
echo \#\!/bin/bash >> tube | |
echo ytdl --max-quality MP4 \$1 >> tube | |
chmod a+x ./tube | |
mkdir ytdl | |
cd ytdl/ |
OlderNewer