Skip to content

Instantly share code, notes, and snippets.

@smmoosavi
smmoosavi / Git-Patch.md
Created April 21, 2015 04:29
Git patch

src:

git format-patch -n 021467b # commit hash

dist:

git am *.patch --committer-date-is-author-date
@smmoosavi
smmoosavi / README.md
Last active August 29, 2015 14:12
change keymaster.js lib behavior with inputs
@smmoosavi
smmoosavi / commands.md
Last active August 29, 2015 14:11
Some useful commands

Some useful commands.

extract tar.gz files

tar -zxvf file.tar.gz

source

@smmoosavi
smmoosavi / olfsm.py
Last active January 3, 2016 00:49
One line finite-state machine implementation
# State machine implementation:
olfsm = lambda Q, input, init: reduce(lambda o, i: o + (o[-1] if i not in Q[o[-1]] else Q[o[-1]][i]), input, init)