Skip to content

Instantly share code, notes, and snippets.

Andrew Turley aturley

Block or report user

Report or block aturley

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ab
We have some systems at work that use the database as a queue. I've been thinking about this a bit. So have other people.
* [5 subtle ways you’re using MySQL as a queue, and why it’ll bite you](
* [A Look At Using Your Database As a Queue](
* [What’s the Best Way to Manage a Database Queue?](
* [Looking for example design of using an SQL database as a queue for throttling web service requests of multiple users](
* [Using Tables as Queues](
aturley / ringmodulation.js
Created Nov 11, 2012
Ring modulation using the web audio api
View ringmodulation.js
var wac = new webkitAudioContext();
var ringGain = wac.createGainNode();
ringGain.gain.setValueAtTime(0, 0);
var ringCarrier = wac.createOscillator();
ringCarrier.type = ringCarrier.SINE;
ringCarrier.frequency.setValueAtTime(2500, 0);
var url = "Ring_Modulation-Original_sample.ogg";
aturley /
Created Aug 9, 2012
4 part series about writing a url shortening service in erlang (using webmachine)
aturley /
Created Aug 1, 2012
This was my email sig for a while. It's a Befunge program that generates a Serpinski triangle.
>84*>:#v_55+"ude.ub@yelruta">:#,_@>188*+>\02p\12p\:22p#v_$ 55+,1- v
^ 0 v +1\ _^#-+*< >22g02g*"_@"*-!1- #v_v>
>:>::3g: ,\188 ^^ -1\g21\g22<p3\"_":<
________________________________@_________________________________^ p3\"@":<
aturley /
Created Jul 19, 2012
irssi to pubnub to web page for remote IRC message notification. Remember to set the keys in the scripts. The soundcloud player API wrapper is from .

To use this, just:

  • Modify the source to use your keys.
  • Put in your .irrsi/script directory and run "/script load" in irssi.
  • Put the .html and .js files in a directory and server the up in a web server.
  • Open up http://yourserverhere/notify.html in a browser.

Now, whenever you get a message in IRC, you'll know.

aturley /
Created Jun 27, 2012
Minimum python file that gets a 10/10 from pylint
aturley / ga_invite.rb
Created Jun 20, 2012
GA code snipped
View ga_invite.rb
if know_code = true
print "forward this email to 5 friends."
print "teach me how to code!"
aturley / git-codecheck
Created Jun 20, 2012
Run pep8 and pylint on all of the new and modified Python files in a git repo.
View git-codecheck
if [ -z "$(which pep8)" ];
echo "Could not find pep8"
exit 1
if [ -z "$(which pylint)" ];
aturley / gist:2955828
Created Jun 19, 2012
regex vs split and test in Python
View gist:2955828
aturley@silverslab [~/play]$ cat
import time
import re
url = ""
url_x = ""
url_l = "
You can’t perform that action at this time.