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
date; sudo dcfldd if=/dev/disk3 of=/Volumes/TRANSFER/"WDC WD75 00AAKS-00RBA0.dd" ibs=32k obs=4k conv=sync,noerror hashwindow=0 hash=sha1 hashlog=hash_sha1.txt; date | |
#via http://www.anguas.com/?p=1160 | |
#install paragon NTFS or similar. |
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
(set -e && git rev-list --reverse master~3..master | while read rev; do git checkout $rev; python runtests.py; done) | |
# set -e causes shell to stop while loop on test error | |
# via Gary Bernhardt |
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
/*via http://n8henrie.com/2015/03/how-to-batch-like-all-facebook-posts-on-a-page-with-jquery-2/ | |
open javascript console & copy paste jquery latest from | |
http://code.jquery.com/jquery-latest.min.js | |
*/ | |
$('a.UFILikeLink[title="Like this"]').each( | |
function(i, e){ | |
this.click() | |
} |
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
xattr -d com.apple.quarantine /path/to/file |
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
//Reactive Programming | |
//http://reactivex.io/learnrx/ | |
//Patrick's favorite exercises to practice: | |
//20, | |
names = ['Jerry','Wang','Shane','Omni'] | |
names.map(x => x[0].toUpperCase() + x.slice(1)) | |
//Search array | |
names.indexOf('Jerry') //returns 0 ---- JS arrays are zero-based |
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
(function(console){ | |
console.save = function(data, filename){ | |
if(!data) { | |
console.error('Console.save: No data') | |
return; | |
} | |
if(!filename) filename = 'console.json' |
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
gif2png -n -O image.gif | |
pngcrush -brute image.png image-crushed.png | |
jpegtran -copy none -optimize -perfect -outfile new.jpg orig.jpg | |
#-copy none removes metadata | |
gifsicle -O2 orig.gif -o new.gif | |
#good for *animated* gifs |
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
#pond { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} |