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
drive_add 0:1:1 file=/dev/sdb,format=raw,if=none,id=newdisk | |
device_add virtio-blk-pci,drive=newdisk |
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
git --git-dir=../<some_other_repo>/.git \ | |
format-patch -k -1 --stdout <commit SHA> | \ | |
git am -3 -k |
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
while true; do VAR=`pmset -g batt|tr -d "'%;"`; if [ `echo $VAR | awk '{print $4}'` == 'Battery' ]; then if [ `echo $VAR|awk '{print $7}'` -lt 100 ]; then echo "Killing caffeinate"; pkill caffeinate; fi; fi; sleep 2; 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
#generate ECDSA key using secp256r1 (or as openssl knows it, prime256v1) | |
#heed warnings about this curve: http://safecurves.cr.yp.to/ | |
openssl ecparam -out kelley.ca_ec_key.pem -genkey -name prime256v1 | |
#generate your CSR | |
#note: Comodo PositiveSSL will issue the cert both with and without www. automatically if you prepend www to your CN | |
openssl req -new -key kelley.ca_ec_key.pem-nodes -out www_kelley_ca.csr -keyout www_kelley_ca.key -subj "/C=US/ST=California/L=San Francisco/O=John Kelley/CN=www.kelley.ca" | |
#submit your CSR and follow instructions |
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
# | |
# setup ssh-agent | |
# | |
# set environment variables if user's agent already exists | |
SSH_AUTH_SOCK=$(ls -l /tmp/ssh-*/agent.* 2> /dev/null | grep $(whoami) | awk '{print $9}') | |
SSH_AGENT_PID=$(echo $SSH_AUTH_SOCK | cut -d. -f2) | |
[ -n "$SSH_AUTH_SOCK" ] && export SSH_AUTH_SOCK | |
[ -n "$SSH_AGENT_PID" ] && export SSH_AGENT_PID |
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
# Quick and dirty Apple HTTP Live Stream ripping to MP4 | |
# John_K 9/9/2014 | |
# First, grab the mov URL from the website using Web Inspector | |
$ curl http://p.events-delivery.apple.com.edgesuite.net/14pijnadfpvkjnfvpijhabdfvpijbadfv09/refs/14oijhbaefvohi9_sl_ref.mov | |
?moov?rmra?rmdazrdrfurl fhttp://p.events-delivery.apple.com.edgesuite.net/14pijnadfpvkjnfvpijhabdfvpijbadfv09/m3u8/sl_mvp.m3u8rmdr | |
# Then grab the playlist that's referred to in it | |
$ curl http://p.events-delivery.apple.com.edgesuite.net/14pijnadfpvkjnfvpijhabdfvpijbadfv09/m3u8/sl_mvp.m3u8 | |
#EXTM3U |
NewerOlder