Skip to content

Instantly share code, notes, and snippets.

View tdegrunt's full-sized avatar

Tom de Grunt tdegrunt

View GitHub Profile
// ==========================================================================
// Project: Todos.TaskDataSource
// Copyright: ©2010 Tom de Grunt.
// ==========================================================================
/*globals Todos */
sc_require('models/task');
Todos.TASKS_QUERY = SC.Query.local(Todos.Task, {
orderBy: 'isDone,description'
});
// ==========================================================================
// Project: Project.MongodbDataSource
// Copyright: ©2010 My Company, Inc.
// ==========================================================================
/*globals Reader */
/** @class
(Document Your Data Source Here)
function upload (req, res) {
var Formidable = require('formidable'),
form = new Formidable.IncomingForm();
form.encoding = 'utf-8';
form.onPart = function (part) {
if (!part.filename) {
form.handlePart(part);
} else {
(function () {

IMPORTANT! Wikified version of this page may be found here. Feel free to edit. :)

Note that since it's kind of PITA to merge changes from other gists it's recommended that you do your changes directly to the wiki!

Game Engines

Name Latest Release Size (KB) License Type Unit Tests Docs Notes
Akihabara 1.3 GPL2/MIT Classic Repro Intended for making classic arcade-style games in JS+HTML5 3
Aves Commercial? Obsolete. Company bought by Zynga.
/*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*/
(function(){
var UPC_SET = {
"3211": '0',
"2221": '1',
"2122": '2',
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<script src="http://yandex.st/raphael/1.5.2/raphael.min.js"></script>
<script>
/**
* A Simple Vector Shape Drawing App with RaphaelJS and jQuery
* copyright 2010 Kayla Rose Martin - Licensed under the MIT license
* Inspired by http://stackoverflow.com/questions/3582344/draw-a-connection-line-in-raphaeljs
**/
@tdegrunt
tdegrunt / formhelper.coffee
Created May 24, 2011 19:28 — forked from janmonschke/formhelper.coffee
Simple FormHelper that works well with Backbone.js Models
###
Helps creating and submitting forms
- easy labeling
- automatically inserts values of the model to the form
- is able to serialize forms to JSON
- can submit the form to the server
- automatically displays errors if there are any
###
class FormHelper
@tdegrunt
tdegrunt / app.coffee
Created August 1, 2011 20:56 — forked from victusfate/app.coffee
express/coffeescript
# load libraries
require 'coffee-script'
mongoose = require 'mongoose'
express = require 'express'
step = require "step"
# about oauth
OAuth = require('oauth').OAuth
oauth = new OAuth(
'https://api.twitter.com/oauth/request_token',
@tdegrunt
tdegrunt / gameengines.md
Created August 2, 2011 14:10 — forked from bebraw/gameengines.md
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.

Name Latest Release Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 1.3.1 (2011/05) 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
Aves Commer-cial Obsolete. Company bought by Zynga. E3 2010 Aves Engine Prototype "Suburban World"
bdge github Badly Design Game Engine, an HTML5 Javascript game engine [Demo](h
@tdegrunt
tdegrunt / nodejs-aws-example.js
Created August 9, 2011 08:25 — forked from juno/nodejs-aws-example.js
AWS EC2 access example w/nodejs, express, aws-lib
var app = require('express').createServer();
var aws = require('aws-lib');
var access_key_id = '***';
var secret_access_key = '***';
var endpoint = 'ec2.ap-southeast-1.amazonaws.com'; // ap-southeast-1
var ec2 = aws.createEC2Client(access_key_id, secret_access_key, {host: endpoint});
app.get('/', function(req, res) {
console.log('/');