Skip to content

Instantly share code, notes, and snippets.

anthony tran atran

View GitHub Profile
View .editorconfig
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
root = true
[*]
end_of_line = lf
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
View gist:50e35c46dc414eeb788a
### Keybase proof
I hereby claim:
* I am atran on github.
* I am atran (https://keybase.io/atran) on keybase.
* I have a public key whose fingerprint is 2FEC 5FF8 6F8F 83F5 4528 B60D 6830 EC24 950C 0B1B
To claim this, I am signing this object:
View gist:afb94ea1e3550e104598
import pyaudio
import mad
import sys
if len(sys.argv) < 2:
print "Plays a wave file.\n\n" +\
"Usage: %s filename.wav" % sys.argv[0]
sys.exit(-1)
mf = mad.MadFile(sys.argv[1])
View gist:d4ee982e0d68b0edb059
$('body').bind 'orientationchange', (e) ->
orientation = if Math.abs(window.orientation) is 90 then 'landscape' else 'portrait'
$('body').removeClass('portrait landscape')
.addClass(orientation)
.trigger('turn', orientation: orientation)
@atran
atran / gist:6924472
Created Oct 10, 2013
squash commits
View gist:6924472
git rebase -i HEAD~2
git push origin +master
@atran
atran / new_gist_file
Created Sep 18, 2013
Download a list of files with renamed filename
View new_gist_file
for i in `cat list.txt`; do wget --content-disposition $i; done
You can’t perform that action at this time.