Skip to content

Instantly share code, notes, and snippets.

@sessa
sessa / image_resize.js
Created May 29, 2012 03:28 — forked from felixge/image_resize.js
On demand image resizing with node.js in
// Usage: http://localhost:8080/image.jpg/100x50
var http = require('http');
var spawn = require('child_process').spawn;
http.createServer(function(req, res) {
var params = req.url.split('/');
var convert = spawn('convert', [params[1], '-resize', params[2], '-']);
res.writeHead(200, {'Content-Type': 'image/jpeg'});
convert.stdout.pipe(res);
@sessa
sessa / dump_scopes.py
Created April 7, 2012 16:25
Dump scopes used by a TextMate grammar
#!/usr/bin/env python
import plistlib
class Grammar(object):
def __init__(self, grammar):
self._grammar = grammar
self.names = []
self.includes = []
@sessa
sessa / LICENSE.txt
Created February 21, 2012 19:40 — forked from aemkei/LICENSE.txt
Binary Tetris - 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE