This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var thing = $("#scheduler").kendoScheduler({ | |
date: new Date("2013/5/6"), | |
showWorkHours: true, | |
views: [ | |
"day", | |
{ type: "workWeek", selected: true }, | |
"week", | |
"month", | |
"agenda" | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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': { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
the_response = urllib2.urlopen("http://api.steampowered.com/ISteamUserStats/GetGlobalAchievementPercentagesForApp/v0002/?gameid=440&format=json").read() | |
print the_response |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'>: ) |