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
# Ensure we're in a virtualenv. | |
if [ "$VIRTUAL_ENV" == "" ] | |
then | |
echo "ERROR: not in a virtual environment." | |
exit -1 | |
fi | |
# Setup variables. | |
CACHE="/tmp/install-pygtk-$$" |
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
*.ipynb | |
*.png | |
*.tar.gz | |
.ipynb_checkpoints | |
.ipython | |
.jupyter | |
.sentinel.* |
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
*.tar.gz | |
.sentinel.* |
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
# get total requests by status code | |
awk '{print $9}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | |
# get top requesters by IP | |
awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | awk -v OFS='\t' '{"host " $2 | getline ip; print $0, ip}' | |
# get top requesters by user agent | |
awk -F'"' '{print $6}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | |
# get top requests by URL |
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
### | |
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places. | |
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of | |
###. things to watch out for: | |
### - Check out the `nix-darwin` instructions, as they have changed. | |
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026 | |
### | |
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs). | |
# So here's a minimal Gist which worked for me as an install on a new M1 Pro. |