Skip to content

Instantly share code, notes, and snippets.

View codejoust's full-sized avatar

Iain codejoust

View GitHub Profile
function doSearch(text){
var registrations = window.registrations;
for (var i = 0; i < registrations.length; i++){
var str = registrations[i].first_name + ' ' + registrations[i].last_name + ' ' + registrations[i].email;
if (str.toLowerCase().indexOf(text.toLowerCase()) != -1){
$('<li/>').html(registrations[i].id + ': ').append($('<a/>', {href: '/admin_stats/add_registration/' + registrations[i].id, text: str})).appendTo('#results');
}
}
}
import alsaaudio
import serial
#import numpy
import struct
import math
ser = serial.Serial('/dev/ttyUSB0', 19200)
inp = alsaaudio.PCM(alsaaudio.PCM_CAPTURE, alsaaudio.PCM_NORMAL, 'Device')
inp.setchannels(1)
from Tkinter import *
import json
import urllib2
def get_location():
req = urllib2.urlopen('http://freegeoip.net/json/')
req_str = req.read()
return json.loads(req_str)
def get_todays_weather(coords):
@codejoust
codejoust / gist:25beb7a5ad690c529cb0
Created October 30, 2014 17:20
for fun :) hacksc foods
(duh?)
... jk ... anything I can nom nom nom.
:)
And coffee.
FEED ME CODE