I hereby claim:
- I am pavel-arapov on github.
- I am aspid (https://keybase.io/aspid) on keybase.
- I have a public key ASDKud_2NH93xU-G89ELSTEiWbrckZmQUntl1DS81mVCDAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| if [ -z "$1" ]; then | |
| echo usage: $0 user@server | |
| exit | |
| fi | |
| echo "uploading key to $1"; | |
| cat ~/.ssh/id_rsa.pub | ssh $1 'cat > key.pub && [ -d .ssh ] || mkdir .ssh && [ -d .ssh/autorized_keys2 ] || touch .ssh/autorized_keys2 && cat key.pub >> ~/.ssh/authorized_keys2 && rm key.pub' |
| # {database} to change | |
| SELECT table_name AS "Tables", | |
| round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" | |
| FROM information_schema.TABLES | |
| WHERE table_schema = "{database}" | |
| ORDER BY (data_length + index_length) DESC; |
| #!/bin/bash | |
| FILETYPES=( "*.html" "*.css" "*.js" "*.xml" "*.txt" ) | |
| DIRECTORIES="/path/to/site/dir/" | |
| MIN_SIZE=512 | |
| for currentDir in $DIRECTORIES; | |
| do | |
| for f in "${FILETYPES[@]}"; | |
| do | |
| files="$(find $currentDir -iname "$f")"; |
This gist assumes: