Skip to content

Instantly share code, notes, and snippets.

@smirn0v
smirn0v / telnet-imap
Created February 7, 2016 20:51 — forked from gustavohenrique/telnet-imap
playing with gmail via telnet
openssl s_client -crlf -connect imap.gmail.com:993
tag login [email protected] passwordhere
tag list "" "*"
tag select "inbox"
tag fetch 1:3 body[header]
tag fetch 3 body[header]
tag fetch 3 body[text]
tag fetch 2 all
tag fetch 2 fast
tag fetch 2 full
@smirn0v
smirn0v / gist:16efe3fdd18e4b9450f6
Created January 25, 2016 13:20
Delete project in Gerrit
delete .git folder inside gerrit app folder
ssh -p 29418 smirn0v@johann gerrit flush-caches --cache projects
atag = "!atag() { git tag -a -m $1 $1 $2; }; atag"
@smirn0v
smirn0v / gist:72944453dfcbe5bc3623
Created January 17, 2016 18:41
binary in oneline hex
xxd -p file | tr -d '\n'
@smirn0v
smirn0v / gist:4897186e053b1ca03c20
Created December 23, 2015 18:52
LLDB Dump to file
memory read --force --outfile /Users/smirnov/original.bin --binary (0x10d981400) (0x10d981400+25872)
@smirn0v
smirn0v / gist:e9cfb9ba88d21364feb4
Created December 16, 2015 17:03
Branches commits diff
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative master..branch-X
osascript -e 'tell application "Messages" to send "HHH" to buddy "Александр Смирнов"'
документация в приложении Script Editor
Script Editor, and go to File -> Open Dictionary, and select the app you want to find out more about.
:%!python -m json.tool
@smirn0v
smirn0v / gist:b798377f523c4d63ae32
Created November 13, 2015 21:01
vim each line to file
:g/^/execute '.w '.line('.').'.txt'
@smirn0v
smirn0v / gist:cfb3110b8ec14fa2c49c
Created November 6, 2015 16:45
Affected tasks
#!/usr/bin/env ruby
require 'set'
require_relative 'issue-tracking'
files = `git log --name-only --oneline HEAD^..HEAD | tail -n+2`.split("\n")
head_hash = `git rev-parse HEAD`
tasks_affected=Set.new
files.each{|f|