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/zsh | |
{ | |
! (( W_CAFFEINATE )) && [[ -x =caffeinate ]] && W_CAFFEINATE=1 exec caffeinate -u -d $0 $* | |
# main code here | |
exit $? | |
} |
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
*** tachang-EyeFiServer-4c473e7/Release 2.0/EyeFiCrypto.py Sun Feb 28 12:47:58 2010 | |
--- ../EyeFiServer/Release 2.0/EyeFiCrypto.py Mon Jan 9 18:27:25 2012 | |
*************** | |
*** 2,7 **** | |
--- 2,8 ---- | |
import struct | |
import array | |
import hashlib | |
+ import sys | |
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
python -c 'import sys,urllib2,lxml.etree;sys.stdout.write(urllib2.urlopen(lxml.etree.parse(open(sys.argv[1])).xpath('"'"'//*[local-name() = "href"]'"'"')[0].text).read())' |
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
-- iTunes: wait completion of refreshing a podcast | |
set podcast_name to "the name of a podcast" | |
tell application "iTunes" | |
repeat 600 times | |
set tl to (tracks of playlist "Podcasts" whose kind is "" and album is podcast_name) | |
if tl is {} then | |
exit repeat | |
end if |
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
-- iTunes: refresh podcasts whose name is "the_name_of_a_podcast" | |
-- podcast "the_name_of_a_porcast" cannot be empty | |
set album_name to "the_name_of_a_podcast" | |
tell application "iTunes" | |
updatePodcast (first track of playlist "Podcasts" whose album is album_name) | |
end tell |