Skip to content

Instantly share code, notes, and snippets.

View SpencerCooley's full-sized avatar

Spencer Cooley SpencerCooley

View GitHub Profile
ConnectionError: HTTPSConnectionPool(host='mq-aws-us-east-1.iron.io', port=443): Max retries exceeded with url: /1/projects/533f532d3393fe000500001f/queues/celery/messages (Caused by <class 'httplib.BadStatusLine'>: )
import urllib2
the_response = urllib2.urlopen("http://api.steampowered.com/ISteamUserStats/GetGlobalAchievementPercentagesForApp/v0002/?gameid=440&format=json").read()
print the_response
ERROR/MainProcess] Unrecoverable error: TypeError("sequence index must be integer, not 'unicode'",)
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/celery/worker/__init__.py", line 206, in start
self.blueprint.start(self)
File "/usr/lib/python2.6/site-packages/celery/bootsteps.py", line 123, in start
step.start(parent)
File "/usr/lib/python2.6/site-packages/celery/bootsteps.py", line 373, in start
return self.obj.start()
File "/usr/lib/python2.6/site-packages/celery/worker/consumer.py", line 278, in start
blueprint.start(self)
data = {
'character_id': {
'option': 'kill',
'comment': 'I would kill them because they have an annoying voice'
},
'character_id': {
'option': 'marry',
'comment': 'I would marry them because they are much smarter. I would be living large.'
},
'character_id': {
function renderImage(file){
var reader = new FileReader();
reader.onload = function(event){
the_url = event.target.result
$('#some_container_div').html("<img src='"+the_url+"' />")
}
//when the file is read it triggers the onload event above.
reader.readAsDataURL(file);
}
//detect a change in a file input with an id of “the-file-input”
$( "#the-file-input" ).change(function() {
//will log a FileList object, view gifs below.
console.log(this.files)
})
var thing = $("#scheduler").kendoScheduler({
date: new Date("2013/5/6"),
showWorkHours: true,
views: [
"day",
{ type: "workWeek", selected: true },
"week",
"month",
"agenda"
],
@SpencerCooley
SpencerCooley / gist:bde16a763785522c2d62
Last active August 29, 2015 14:08
datasource object
var sampleExistingData = [
{
id: 1,
start: new Date("2013/5/6 08:00 AM"),
end: new Date("2013/5/6 10:00 AM"),
title: "Available To Volunteer",
},
{
#!/bin/bash
sudo apt-get update
sudo apt-get install docker.io -y
source /etc/bash_completion.d/docker.io
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb https://get.docker.com/ubuntu docker main\ > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker -y
sudo apt-get install python-pip -y
curl -L https://github.com/docker/fig/releases/download/1.0.1/fig-`uname -s`-`uname -m` > /usr/local/bin/fig; chmod +x /usr/local/bin/fig
var theData = getData();
function waitForData(){
if(theData == undefined){
console.log("data not set yet.")
setTimeout(waitForData(), 3000)
}
else{
console.log("hello world. Data is now set")
}