Skip to content

Instantly share code, notes, and snippets.

$ date +'%s' #osx
$ date -d '@1471007760' #linux
1414621704
$ date -r1414621704
Wed 29 Oct 2014 22:28:24 GMT
# replace AA anywhere in the filenames with BB
$ for file in *; do mv "$file" "${file/AA/BB}"; done
$ dig +short myip.opendns.com @resolver1.opendns.com
varnishncsa -a -w /var/log/varnish/access.log -D -P /var/run/varnishncsa.pid

Keybase proof

I hereby claim:

  • I am jdfitzgerald on github.
  • I am jdfitzgerald (https://keybase.io/jdfitzgerald) on keybase.
  • I have a public key whose fingerprint is 574D 90B3 1CA4 A6F2 77B7 0FB1 70E3 6C8D 8664 DFFA

To claim this, I am signing this object:

iptables -A INPUT -s xx.xx.xx.xx -j DROP
# delete all lines beginning with 'AAA' from file.txt
$ sed -i '/^AAA/d' file.txt
# npm install -g cfcli
# configure .cfcli.yml
for i in `cfcli listdomains -f csv | cut -d, -f1`; do cfcli listrecords -d $i -f csv; done
#this is for yosemite
sudo discoveryutil udnsflushcache; sudo discoveryutil mdnsflushcache