Skip to content

Instantly share code, notes, and snippets.

View atran's full-sized avatar

anthony tran atran

View GitHub Profile
@atran
atran / new_gist_file
Created September 18, 2013 23:30
Download a list of files with renamed filename
for i in `cat list.txt`; do wget --content-disposition $i; done
@atran
atran / gist:6924472
Created October 10, 2013 19:52
squash commits
git rebase -i HEAD~2
git push origin +master
@atran
atran / gist:d4ee982e0d68b0edb059
Created August 13, 2014 17:44
Please rotate.
$('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:afb94ea1e3550e104598
Created August 20, 2014 01:10
Play MP3s with pyaudio
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])
### 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:
@atran
atran / .editorconfig
Created December 11, 2018 20:53
Hello
# 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
@atran
atran / jquery-exercises.md
Last active June 16, 2022 17:04 — forked from toolness/jquery-exercises.md
jQuery Exercises

Here are some mini exercises to challenge your jQuery skills a bit.

Instructions

Create a new HTML page locally with jQuery installed in it, called jquery-hw.html

Exercise 1

HTML