miscnotes
Mysql
SELECT p.id, p.mlsid, p.address, p.status, p.realtor, w.price FROM property p JOIN pricewatch w ON p.id = w.pid WHERE STATUS = 'active' AND w.price BETWEEN 250000 AND 400000 ORDER BY p.address, w.price DESC
SELECT p.id, p.mlsid, p.address, p.status, p.realtor, w.price FROM property p JOIN pricewatch w ON p.id = w.pid WHERE p.address LIKE '%cascade%' ORDER BY p.mlsid, w.price DESC ;
Bash
rsync --progress -a --size-only --exclude='lukedive' --delete /Volumes/files/* /Volumes/400GB/
ssh -L 8080:localhost:80 root@server.lukej.net
CMD.exe
PERL
[root@granite luke]# perl -pi -e 's/(\d\d)\/(\d\d)\/(\d\d\d\d)/$3-$1-$2/g;' /tmp/file.csv
Convert US dates to mysql in a csv via PERL
perl -pi -e 's/luke\/tenakee/luke\/denali/gi `grep -ilr tenakee .g*`
Disk Recovery
http://en.wikipedia.org/wiki/TestDisk
http://en.wikipedia.org/wiki/PhotoRec
http://ubuntuforums.org/showthread.php?t=1694592
for i in $(ls *.JPG); do exiv2 -r '%Y%m%d.%H%M%S.:basename:' rename $i; done