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
# grep -oP "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" file_of_access_log_entries | sort -u > file_of_ip_addresses | |
# xargs -L1 whois < file_of_ip_addresses > file_of_whois_output |
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
$ end_date=`date '+%s'`; stat -f "%m;%N" * | awk -F\; -v e=$end_date '{print int((e-$1)/86400), "days \t", $2}' | sort -rn |
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
#!/bin/bash | |
# | |
# Because of Hurricane Sandy (and us having all of our stuff co-located at Datagram in lower Manhattan) | |
# we had a major outage. I used this to monitor their website for updates. | |
# It's running on a local cronjob, every 5 minutes: | |
# */5 * * * * /Users/me/check_dg | |
# | |
# More about the outage: | |
# http://www.datacenterknowledge.com/archives/2012/10/30/major-flooding-nyc-data-centers/ |
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 | |
/* | |
* this is what "powers" http://sportsguytube.blogspot.com/ | |
* It pulls all the youtube links from Bill Simmons' tweets and then posts them to Blogger via email. | |
* I put it together in a couple hours one night and built the site on a whim. | |
* Simmons tweeted it out to his 1MM followers: https://twitter.com/sportsguy33/status/4176287276 | |
* | |
*/ |
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
#!/bin/bash | |
# | |
# takes a url like this: | |
# http://www.disneyphotopass.com/api/photostore/getSharedImageList.ashx?ShareToken=[[token]] | |
# and saves all the pictures to ./disneypics | |
# | |
# url can be found by going to http://www.disneyphotopass.com/photoshare.aspx and sharing photos by email. | |
# the link will be in the email | |
[[ -n "$1" ]] || { echo "Please add the share url as a parameter"; exit 0; } |
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 | |
$use_upper = true; | |
$use_lower = true; | |
$use_digits = true; | |
$use_symbols = true; | |
$string_length = 24; | |
$letters = 'abcdefghijklmnopqrstuvwxyz'; |