Skip to content

Instantly share code, notes, and snippets.

@on-three
on-three / gist:feefb0f137b132aa163e
Created September 2, 2014 08:00
Video Capture setup
#?tv?shows_20140523.log:[22:02:49] <swam> qb: cablecard > external usb infinitv4 > wmc > hdfury3 > avermediahd internal pmcia capture card > vlc
@on-three
on-three / icecast.xml
Created September 6, 2014 22:24
Basic icecast config used for weeabot
<icecast>
<limits>
<clients>500</clients>
<sources>10</sources>
<threadpool>10</threadpool>
<queue-size>10000000</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>30</source-timeout>
<burst-on-connect>1</burst-on-connect>
@on-three
on-three / gist:8726cbed1ce05479ecb2
Created September 11, 2014 00:54
Unmangle a C++ method name
c++filt -n _Z1fv
#where _z1fv is the method name (e.g.)
@on-three
on-three / gist:9e40cbf33765dbd3ffbb
Last active October 11, 2022 14:09
VLC capture window by xwindows id (window capture and streaming WITH audio)
1: Get the audio output device you'll record off:
pacmd list-sources | awk '/name:.+\.monitor/'
name: <alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor>
name: <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
2: Get the x windows id (linux) of the window you'll capture
xwininfo -name "Nestopia"
xwininfo: Window id: 0x3a00003 "Nestopia"
...
@on-three
on-three / gist:c56bba30ddc67c9bb257
Created September 21, 2014 03:25
Curl post on old futaba board (may not work currently)
Here, it's easy:
curl -A "Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0" -F bbs="prog" -F id="$id" -F lol what 2 -F meiru="sage" -F kotehan="Anonymous" -F com="$msg" -F email="'" http://dis.4chan.org/post > /dev/null 2>&1;
You need a valid user agent (just put some mainstream browser name). $id is the id of the thread where you want to post, "meiru" is the mail, "kotehan" the name (funny weeaboo shit). $msg is obviously your message. Important: you must post "'" in the "email" field (that's the antispam, you will be banned if you don't).
If you want to execute that command in a loop for sagebombing, you have to wait 5 seconds between each posts.
I am confident that you're not going to use this for spamming this board, only for testing/learning purpose. Happy new year!
@on-three
on-three / gist:4d9d218311aa20ff2f8f
Created September 26, 2014 08:19
snapshot http stream with vlc via command line
cvlc http://URL --rat1 --video-filter=scene --vout=dummy --aout=dummy --scene-ratio=24 --scene-prefix=$PREFIX --scene-path=$SNAPSHOT_PATH --scene-width=$WIDTH --scene-replace vlc://quit
@on-three
on-three / gist:cbfd7d03a526be0a2a86
Created October 5, 2014 01:29
formatting for stream
return foreground(u'white') + background(u'black') \
+ u' ' + self._name + u' ' \
+ foreground(u'white') + background(u'green') + u' ' + self._url + u' '\
+ foreground(u'white') + background('black') + u' ' + self._desc + u' '
@on-three
on-three / gist:651ae0cb58d2fd463116
Last active November 9, 2021 08:37
ascii shit
▒▒▒▌▒▒▒▒▒▒▒▒▒▒▒▒▒▄▀▒▒▒▒▒▒▒▒▒▐▒▒
▒▒▐▒▒▒▒▒▒▒▌▒▒▒▒▒▌▒▒▒▒▒▐▒▒▌▒▒▒▌▒
▒▒▌▐▒▒▒▒▒▐▒▒▒▒▄▌▒▒▄▀▒▄▌▌▒▐▒▒▒▌▒
▒▒▌▌▒▒▒▒▌▌▒▒▒█▐▒▄▀░▄▀▐░▐▒▐▒▒▐▒▒
▒▒▌▌▒▒▒▐▐▒▒▒▐░▌▀░▄▀░░▌░▐▒▐▒▒▄▒▐
▄▀▄▒▒▒▒▌▒▒▄▀▌▐▌▀▀▄▄▄▐░░▌▒▒▄▀▌▒▐
▐░░▌▒▒▐▒▄▀░▐▄▄▄▀▀▄░▌▀▀▀▐▒▄▀░▌▒▌
▌░▌▐▒▒▄▀░░░███▀▐░▐▌░░░▄▀▀░▀▄▐▒▌
▐▐░▌▒▐░░░░░▐███░░░░░░░░░░░▀▀▌▒▒
▄░░▀▄▌░░░░░░▀▀░░░░░░░░░░█▀▌▐▒▒▒
@on-three
on-three / gist:c99c5b6c7a2290fd391e
Created January 31, 2015 08:59
capture single snapshot of live video stream
ffmpeg -ss 00:00:08 -i http://xxx.com:8080/stream.ts -r 1 -vframes 1 capture.jpg
Parts 1 & 2 - http://a.pomf.se/rytlvx.mp4
Part 3 - http://a.pomf.se/qmxioa.mp4
Part 4 - http://a.pomf.se/jorhqe.mp4
Part 5 - http://a.pomf.se/jqqrlv.mp4
Part 6 - http://a.pomf.se/wwxiug.mp4