Skip to content

Instantly share code, notes, and snippets.

@tim-smart
tim-smart / usage_main.js
Created February 7, 2010 02:46
Node.js Web Workers
// The main node process
// Will output to shell:
// {
// "test": "test"
// }
// "bam"
var worker = require('./webworker'),
sys = require('sys');
@jeremieweldin
jeremieweldin / SaveIconsForiOSIcons.jsx
Created September 13, 2010 18:31
Illustrator automation script for exporting an icon artboard to all the sizes needed for iOS apps.
var destFolder = null;
destFolder = Folder.selectDialog( 'Select the folder where you want to save the exported files.', app.activeDocument.path );
var baseDestName = app.activeDocument.name;
if (baseDestName.indexOf('.') < 0)
{
//nothing
} else {
@shripadk
shripadk / gist:652819
Created October 29, 2010 03:10
Express authentication using Redis for session store and Couchdb for database (in coffeescript!)
###
Module dependencies
###
require.paths.unshift "#{__dirname}/lib/support/express-csrf/"
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/"
express = require 'express'
app = module.exports = express.createServer()
RedisStore = require 'connect-redis'
@bebraw
bebraw / gameengines.md
Created January 6, 2011 18:07
List of JS game engines. You can find a wikified version at https://github.com/bebraw/jswiki/wiki/Game-Engines. Feel free to modify that. I sync it here every once in a while.

IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version. There's also a "notes" column in the table but it simply does not fit there... Check out the raw version to see it.

This table contains primarily HTML5 based game engines and frameworks. You might also want to check out the [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]] and [[Scene Graphs]].

Name Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
AllBinary Platform Platform Dependent AllBinary 2D/2.5D/3D n
@jed
jed / LICENSE.txt
Created May 10, 2011 14:44 — forked from 140bytes/LICENSE.txt
route client urls with 404s and pattern captures
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
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
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
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
@kurtschindler
kurtschindler / hs-blog-NHibernateGlimpsePlugin.txt
Created July 29, 2011 19:07
NHibernate Glimpse Plugin - full source
http://www.headspring.com/2011/07/creating-a-glimpse-plugin-to-log-sql-generated-by-nhibernate
The following code is all that's required to implement a Glimpse plugin that renders the SQL generated by NHibernate. A full blog post describing this is at the link above.
1. Create a custom Log4Net appender:
-----------------------------------
public class NHibernateQueryAppender : AppenderSkeleton
{
protected override void Append(LoggingEvent loggingEvent)
@indexzero
indexzero / cocoa-hello-world2.js
Created September 8, 2011 18:33 — forked from TooTallNate/cocoa-hello-world2.js
Creating a Cocoa GUI window with NodObjC, with a proper Menu, dock icon, and NSApplicationDelegate.
// This example adapted from Matt Gallagher's "Minimalist Cocoa Programming"
// blog article:
// http://cocoawithlove.com/2010/09/minimalist-cocoa-programming.html
var $ = require('NodObjC')
$.import('Cocoa')
var pool = $.NSAutoreleasePool('alloc')('init')
, app = $.NSApplication('sharedApplication')
@mikeash
mikeash / blockforward.m
Created October 21, 2011 02:38
NSInvocation works for blocks too!
#import <dlfcn.h>
#import <Foundation/Foundation.h>
struct BlockDescriptor
{
unsigned long reserved;
unsigned long size;
void *rest[1];
@vmihailenco
vmihailenco / proxy.go
Created November 20, 2011 15:22
Simple TCP proxy in Golang
package main
import (
"bytes"
"encoding/hex"
"flag"
"fmt"
"io"
"log"
"net"