Skip to content

Instantly share code, notes, and snippets.

git format-patch -1 HEAD
patch -p1 < file.patch
@smirn0v
smirn0v / gist:8297865
Created January 7, 2014 11:07
Beamer ffmpeg transmux
/Applications/Beamer2.app/Contents/Resources/ffmpeg -ss 0 -i file:/Users/smirnov/Downloads/Х?M^@ани?M^Bели ?M^Aнов [Rise of the Guardians] (2012) BDRip-Hi10P 1080p by_F.HD.mkv -t 5352.38900 -f mpegts --segment-length 5 --segment-offset 0 -vcodec libx264 -x264opts vbv-bufsize=12000:vbv-maxrate=12000:ratetol=inf -force_key_frames expr:gte(t,n_forced*5) -pix_fmt yuv420p -map 0:0 -acodec aac -strict experimental -ac 2 -ab 160k -matrix_encoding dplii -ar 48000 -async 1 -map 0:1 pipe:1
@smirn0v
smirn0v / gist:8131555
Created December 26, 2013 09:13
Colored IRC in bash
echo -e "\00035Some\03" > test
The syntax of the color attribute in text has the format ^CN[,M]
Note: if you want to color text that begins with numbers, this syntax requires that you specify the color value as two digits.
The color indexes 0 to 15 represent the following colors:
0 white
1 black
2 blue (navy)
3 green
@smirn0v
smirn0v / gist:8055954
Created December 20, 2013 15:00
Chrome explicitly allowed ports
open /Applications/Google\ Chrome.app --args --explicitly-allowed-ports=6667
@smirn0v
smirn0v / gist:8038643
Created December 19, 2013 12:50
Gerrit disable/enable plugin
ssh -p 29418 smirn0v@johann gerrit plugin remove hooks-jira
ssh -p 29418 smirn0v@johann gerrit plugin enable hooks-jira
@smirn0v
smirn0v / uClibc
Created December 15, 2013 15:12
uClibc
unset CC
unset CXX
unset LIBRARY_PATH
unset LD_LIBRARY_PATH
make manuconfig
...choose appropriate target architecture...
make
@smirn0v
smirn0v / gist:7962256
Created December 14, 2013 17:36
Check endianess
echo -n I | hexdump -o | awk '{ print substr($2,6,1); exit}'
# 0 for big endian
# 1 for little endian
@smirn0v
smirn0v / gist:7794833
Created December 4, 2013 20:22
git show only commit message
git log --format=%B -n 1 9edb88ba0c9ce09df0212371cefee5f1a6914cb5
@smirn0v
smirn0v / gist:7794504
Last active December 30, 2015 07:09
Get feature branch commits
git co feature-branch
git log --oneline HEAD --not parent-branch
@smirn0v
smirn0v / gist:7766068
Created December 3, 2013 08:54
gerrit start
sudo su gerrit2
java -jar gerrit.war init -d /path/to/your/gerrit_application_directory