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 tornado | |
from django.conf import settings | |
from application.events.models import Event | |
class GetDataFromCamera(tornado.web.RequestHandler): | |
def post(self): | |
json_data = json.loads(self.request.body) | |
self.finish() |
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
git config --unset-all core.ignorecase && git config --system core.ignorecase false |
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
apt-get install build-essential libsqlite3-dev zlib1g-dev libncurses5-dev libgdbm-dev libbz2-dev libreadline5-dev libssl-dev libdb-dev | |
wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz | |
tar -xzf Python-2.7.6.tgz | |
cd Python-2.7.3 | |
./configure | |
make | |
make install | |
cd .. |
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
du -h /path/to/folder | grep ^[0-9.]*G |
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
{{ rand|add:"12345"|make_list|random }} |
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
$("#foursquare_photos").html('<h2>Loading photos...</h2>'); | |
$.get("https://api.foursquare.com/v2/venues/VENUE_ID/photos?limit=9&client_id=ID&client_secret=SECRET&v=20131016", function (data) { | |
$("#foursquare_photos").html(''); | |
$(data.response.photos.items).each(function (i, val) { | |
$("#foursquare_photos").append('<div class="fsphoto"><img src="' + val.prefix + '70x70' +val.suffix + '"></div>'); | |
}); | |
}, 'json'); |
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 | |
# Stephen's Raspberry Pi Mimimalist install from standard Raspdian Image | |
apt-get update | |
apt-get purge xserver* -y | |
apt-get purge ^x11 -y | |
apt-get purge ^libx -y | |
apt-get purge ^lx -y | |
apt-get purge samba* -y | |
apt-get autoremove -y | |
apt-get upgrade -y |
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
process.on('uncaughtException', function (err) { | |
console.log(err); | |
}); |
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
apt-get download libapache2-mod-wsgi | |
dpkg --force-all -i libapache2-mod-wsgi.... |
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 | |
### BEGIN INIT INFO | |
# Provides: swap | |
# Required-Start: | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 1 0 6 | |
# Short-Description: add fake swap. | |
### END INIT INFO |
NewerOlder