This file contains hidden or 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
#EXTM3U | |
#EXT-X-VERSION:3 | |
#EXT-X-TARGETDURATION:2 | |
#EXT-X-MEDIA-SEQUENCE:10395 | |
#EXTINF:1.0, | |
fake_10395.ts | |
#EXTINF:1.0, | |
fake_10396.ts | |
#EXTINF:1.0, | |
fake_10397.ts |
This file contains hidden or 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
# sample data: | |
echo '{"count": {}, "block": | |
{ | |
"67.215.237.26": { | |
"paths": { | |
"/js/compiled.js": 1, | |
"/css/global-compiled.css": 1, | |
"/js/pace.min.js": 1 | |
}, | |
"max_req_per_min": 1, |
This file contains hidden or 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
begin | |
remote = element | |
prog = irexec | |
button = KEY_PLAYPAUSE | |
config = /bin/sh /home/pi/chromecast-button/pause.sh | |
config = /bin/sh /home/pi/chromecast-button/play.sh | |
end | |
begin | |
remote = element | |
prog = irexec |
This file contains hidden or 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
count = 0 | |
while (count < 0x10000): | |
formatted = format(count, '04X') | |
print " KEY_{0} 0x{0}".format(formatted) | |
count += 1 |
This file contains hidden or 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/sh | |
# see lircd.conf here: https://gist.github.com/jlongman/a7a56241506681083d9b939828716dd6 | |
irsend SEND_ONCE seiki KEY_TV | |
sleep 5 | |
irsend SEND_ONCE seiki KEY_INPUT_SOURCE | |
irsend SEND_ONCE seiki KEY_UP | |
irsend SEND_ONCE seiki KEY_UP | |
irsend SEND_ONCE seiki KEY_UP | |
irsend SEND_ONCE seiki KEY_UP | |
irsend SEND_ONCE seiki KEY_OK |
This file contains hidden or 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
begin remote | |
name seiki | |
bits 16 | |
flags SPACE_ENC|CONST_LENGTH | |
eps 30 | |
aeps 100 | |
header 9046 4428 | |
one 596 1606 |
This file contains hidden or 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
xmlstarlet sel -N my=http://www.w3.org/1999/xhtml -t -c "my:html/my:body/my:div[@class='single-post']" -c "my:html/my:body/my:div/my:div/my:ol[@id='comments']" indexfbc5-4.html |
This file contains hidden or 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
# usage: pipe an ls command with relevant files. | |
# e.g. 'ls indexea4f*.html| python wayback-files.py' | |
# | |
# assumption: your source pages are static and you don't care about the differences from different dates. | |
# my blog didn't tend to have blog entry edits | |
import sys | |
import os | |
lastname = "" |
This file contains hidden or 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
# there's a tool on Linux that does similar to this, not on FreeBSD | |
ssh_publish(){ | |
host=$1 | |
shift | |
ssh-keygen -R $host | |
cat ~/.ssh/id_dsa.pub | ssh -oStrictHostKeyChecking=no $host $@ "mkdir -p .ssh && cat >> .ssh/authorized_keys" | |
} |