Skip to content

Instantly share code, notes, and snippets.

@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: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: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: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
@on-three
on-three / gist:8eaa1db3e4d647fa2d35
Created August 21, 2015 04:59
vlc stream dektop
cvlc screen:// :screen-fps=30 :live-caching=300 :screen-top=100 :screen-left=100 :screen-width=1280 :screen-height=720 --sout '#transcode{vcodec=h264,acodec=mpga,ab=128,channels=2,samplerate=44100}:http{mux=ffmpeg{mux=flv},dst=:8085/}' :sout-keep
@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
[#4] Niji no Conquistador - LOVE鮗コ 諱句袖 繧・o繧・ --no-config --no-fs --no-border --autofit=1280x720 │+dij
│ --geometry=1280x720+1600+0 --audio-display=no --vo=direct3d --terminal=yes --force-window=yes --af=drc=2:0.25 --softvol │+Dionysus
│ --user-agent=Mozilla/5.0 --cache=auto --cache-initial=1000 --cache-pause --network-timeout=1 │+donics
│ --script=C:\Users\Owner\AppData\Roaming\mpv\maws-assist.lua [01:29:55/01:29:57] (99%)
@on-three
on-three / 7.BANE.mp3.phonemes.txt
Created March 15, 2018 06:35
example phoneme file generated off .wav file (itself generated from text via Text to Speech)
SIL F UH Y UW K SIL
SIL 0.000 0.070 1.000000
F 0.080 0.190 1.000000
UH 0.200 0.240 1.000000
Y 0.250 0.390 1.000000
UW 0.400 0.680 1.000000
K 0.690 0.740 1.000000
SIL 0.750 0.830 1.000000
@on-three
on-three / cocos2dx-build-notes-linuxmint-18.txt
Created December 22, 2018 19:46
build cocos2dx on linuxmint 18
cat /proc/version
Linux version 4.4.0-138-generic (buildd@lcy01-amd64-006) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) ) #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018
# typical install fails
git clone ....
cd to-the-repo
git submodule update --init
./download-deps.py
./build/install-deps-linux.sh
cd build