Skip to content

Instantly share code, notes, and snippets.

View mattrobenolt's full-sized avatar
🤠
🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔

Matt Robenolt mattrobenolt

🤠
🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔
View GitHub Profile
We couldn’t find that file to show.
$ npm xmas
/\
/ @\
/ i i\
/ i \
/i & 。⸛&\
/ i \
/⸮ ⁂⸛ &@⸮。 &\
import sys
import simplejson as json
try:
import cPickle as pickle
except ImportError:
import pickle
def main(argv):
try:
var http = require('http');
http.createServer(function (req, res) {
var timeout = setTimeout(function() {
clearTimeout(main);
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Quit!');
}, 2000);
var main = setTimeout(function() {
clearTimeout(timeout);
var MailParser = require("mailparser").MailParser;
exports.hook_queue = function (callback, connection) {
// Parse the mail first...
var mp = new MailParser({fix_smtp_escapes: 0});
var headers;
var body;
var t = this;
mp.on('header', function (h) {
@mattrobenolt
mattrobenolt / mongodb.py
Created May 19, 2011 01:16
Wrapper for pymongo to integrate nicer into Django with failover stuff
from pymongo import Connection
from pymongo.collection import Collection
from pymongo.errors import AutoReconnect
from django.conf import settings
from types import FunctionType
import functools
import time
(Yeah, Ah-Ah-Ah-Ah-Ah-Ark)
Oo-ooh-ooh, hoo yeah, yeah
Yeah, yeah
Yeah-ah-ah
Yeah-ah-ah
Yeah-ah-ah
Yeah-ah-ah
Yeah, yeah, yeah
7am, waking up in the morning
@mattrobenolt
mattrobenolt / sprites.jsx
Created July 27, 2011 14:07
Crude Photoshop script to import a series of images and lay them out into a sprite sheet.
const FRAME_WIDTH = 410;
const FRAME_HEIGHT = 280;
const MAX_COLUMNS = 10;
var newDocumentName = prompt("Name of new document?", "New Sprite Sheet");
var images = getFolder(),
background = getBackground(),
columns = Math.min(MAX_COLUMNS, images.length),
@mattrobenolt
mattrobenolt / gist.py
Created July 27, 2011 16:28
Django templatetag for embedding GitHub gists
from django.template import Library, Node, TemplateSyntaxError, Variable, VariableDoesNotExist
from django.core.cache import cache
from django.utils.hashcompat import md5_constructor
import urllib2
register = Library()
class GistNode(Node):
def __init__(self, gist_id, filename=None, *args):
$('#sprite_once').sprite({
speed: 50,
frames: 72,
columns: 9,
mode: 'once',
onStep: function(e)
{
$(this).nextAll('.status').text(e.step);
},
onComplete: function()