Skip to content

Instantly share code, notes, and snippets.

With etagres and streaming:

$ nab http://localhost:1041/about
REQ NUM: 100 RTN NUM: 100 QPS: 33 BODY TRAF: 517KB per second
REQ NUM: 300 RTN NUM: 290 QPS: 48 BODY TRAF: 750KB per second
$ ps aux | grep node                                                                          
gsf       8938 25.2  2.6 757788 104256 pts/8   Sl+  12:52   0:07 node server.js
$ node-tick-processor
...
   ticks parent  name
@gsf
gsf / avi2mp4.sh
Last active August 29, 2015 14:01
avi2mp4
$ for f in *.avi; do ffmpeg -i $f -strict -2 `basename $f .avi`.mp4; done
@gsf
gsf / .xinitrc
Last active August 29, 2015 14:01
fullscreen x
matchbox-window-manager -use_titlebar no &
exec xterm
$ ps aux | grep Iptab
root 2487 0.0 0.0 1216 32 ? S 17:17 0:00 /boot/.IptabLes
root 2489 0.0 0.0 50368 252 ? Sl 17:17 0:00 /boot/.IptabLes
root 2493 0.0 0.0 852 32 ? S 17:17 0:00 /boot/.IptabLex
root 4013 0.0 0.0 9040 188 ? Sl 18:04 0:00 /boot/.IptabLex
root 4209 163 0.0 50952 604 ? Sl 18:19 0:01 /boot/.IptabLes
gsf 4215 0.0 0.0 3428 772 pts/5 R+ 18:19 0:00 grep --color=auto Iptab
$ ps aux | grep Iptab
root 2487 0.0 0.0 1216 32 ? S 17:17 0:00 /boot/.IptabLes
root 2489 0.0 0.0 50368 256 ? Sl 17:17 0:00 /boot/.IptabLes
@gsf
gsf / ed.md
Last active August 29, 2015 14:03
ed is the standard text editor
@gsf
gsf / gist:51776e85bc6dc62ec32b
Created July 16, 2014 12:23
FI9821W VLC web streaming
cvlc rtsp://xxx:xxxxxxxx@192.168.1.111:88/videoMain --sout="#transcode{vcodec=theo,acodec=vorb,ab=128,channels=2,samplerate=44100}:std{access=http{mime=video/ogg},mux=ogg,dst=:8080/vid.ogg}"
@gsf
gsf / gist:a4c20515656615347dfe
Created July 19, 2014 03:17
Git cleanslate
$ git fetch
$ git reset --hard FETCH_HEAD
@gsf
gsf / fi8910w-cvlc.md
Last active August 29, 2015 14:04
FI8910W cvlc

Audio only:

$ cvlc --network-caching=0 --no-video 'http://xxxxxx:xxxxx@xxxxxx/videostream.asf?rate=11'

With video:

$ cvlc --network-caching=0 --fullscreen 'http://xxxxxx:xxxxx@xxxxxx/videostream.asf?rate=11'
@gsf
gsf / gist:9515a50187fcbca16981
Last active August 29, 2015 14:07
RecordTrac example data on Heroku
$ heroku run python db_users.py
Running `python db_users.py` attached to terminal... up, run.9338
Traceback (most recent call last):
  File "db_users.py", line 4, in <module>
    set_directory_fields()
  File "/app/public_records_portal/prr.py", line 284, in set_directory_fields
    csvfile = urllib.urlopen(app.config['STAFF_URL'])
  File "/app/.heroku/python/lib/python2.7/urllib.py", line 87, in urlopen
    return opener.open(url)
@gsf
gsf / gist:257ffc763d8a96f0fe24
Created October 9, 2014 21:37
Ethics download
curl 'http://plis.cloudapp.net/Public/wfSearch.aspx' -H 'Cookie: ASP.NET_SessionId=2flgiiscl5dmb0z4mwebitrj' -H 'Origin: http://plis.cloudapp.net' -H 'Accept-Encoding: gzip,deflate' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: max-age=0' -H 'Referer: http://plis.cloudapp.net/Public/wfSearch.aspx' -H 'Connection: keep-alive' --data 'ToolkitScriptManager1_HiddenField=%3B%3BAjaxControlToolkit%2C+Version%3D3.5.40412.0%2C+Culture%3Dneutral%2C+PublicKeyToken%3D28f01b0e84b6d53e%3Aen-US%3A1547e793-5b7e-48fe-8490-03a375b13a33%3A475a4ef5%3Aeffe2a26%3A8e94f951%3A1d3ed089%3A5546a2b%3Ad2e10b12%3Af9e9a939&__EVENTTARGET=ctl00%24MainContent%24tcSearch%24tpQuickSearch%24ucQuickSearch%24lnbExportWOSearch&__EVENTARGUMENT=&MainContent_tcSearch_ClientState=%7B