Skip to content

Instantly share code, notes, and snippets.

View Marak's full-sized avatar

Marak

View GitHub Profile
@Marak
Marak / server.js
Created October 10, 2010 04:58 — forked from DTrejo/server.js
var sys = require('sys'),
eyes = require('eyes'),
url = require('url'),
querystring = require('querystring'),
httpProxy = require('http-proxy');
exports.start = function() {
var static = require('node-static');
// Create a node-static server to serve the current directory
var file = new(static.Server)('./public', { cache: 7200, headers: {'X-Hello':'World!'} });
//http://blog.nodejitsu.com/jsdom-jquery-in-5-lines-on-nodejs
var httpAgent = require('http-agent'),
jsdom = require('jsdom'),
sys = require('sys');
var agent = httpAgent.create('www.google.com', ['finance', 'news', 'images']);
//original line:
//agent.addListener('next', function (agent) {
tcp = require("tcp");
sys = require("sys");
// Google smtp server
var client = tcp.createConnection(25, 'smtp.gmail.com');
// Thawte Premium Server CA
var caPem = '-----BEGIN CERTIFICATE-----\n'
+ 'MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx\n'
+ 'FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD\n'
@Marak
Marak / gist:772298
Created January 10, 2011 03:12 — forked from gerhard/gist:372205
#!/usr/bin/env ruby
# Configures the git author to a list of developers when pair programming
#
# Usage: pair cr pf (Sets the author to 'Charlie Robbins, and Paolo Fragomeni')
# pair (Unsets the author so the git global config takes effect)
#
# Author: Bryan Helmkamp (http://brynary.com)
#######################################################################
@Marak
Marak / lineWrap.js
Created January 15, 2011 17:04 — forked from indutny/lineWrap.js
function lineWrap(str) {
// Split by lines
return str.split(/\r|\n|\r\n/g).reduce(function(prev, piece) {
var parts = [];
// Wrap line
while (piece.length) {
var match = piece.match(/^.{1,80}(?:\s|$)/),
matchlen;

Game Engines

Name Latest Release Size (KB) License Type Unit Tests Docs Notes
The Render Engine 1.5.3 MIT Cross-browser; extensive API; open-source. 2
gameQuery 0.5.1 CC BY-SA 2.5 Designed to be used with jQuery
gTile 0.0.1 (2008-07-21) Tile based
Akihabara 1.3 GPL2/MIT Classic Repro Intended for making classic arcade-style games in JS+HTML5 3
The Javascript 2D Game Engine GPL Emphasis on gravity/physics/collision detection; uses HTML5 Canvas and ExplorerCanvas for IE support. Focus on limiting CPU usage. 4
The GMP Javascript Game Engine
@Marak
Marak / git-commit-prefixes
Created April 20, 2011 22:39 — forked from indexzero/git-commit-prefixes
Short list of Git commit prefixes used at Nodejitsu
[api]: New apis / changes to apis
[test]: Update test/* files
[dist]: Changes to submodules, version bumps, updates to package.json
[minor]: Small changes
[doc]: Updates to documentation
[ux]: Updates to UX
[fix]: Bug fixes
[merge]: Resolved git merge from upstream or otherwise
[refactor]: Refactor of existing code with no external API changes
@Marak
Marak / git-commit-prefixes
Created May 18, 2011 06:12 — forked from indexzero/git-commit-prefixes
Short list of Git commit prefixes used at Nodejitsu
[api]: New apis / changes to apis
[test]: Update test/* files
[dist]: Changes to submodules, version bumps, updates to package.json
[minor]: Small changes
[doc]: Updates to documentation
[ux]: Updates to UX
[fix]: Bug fixes
[bin]: Update binary scripts associated with the project
[merge]: Resolved git merge from upstream or otherwise
[refactor]: Refactor of existing code with no external API changes
@Marak
Marak / levenshtein.js
Created May 18, 2011 23:21 — forked from graphnode/levenshtein.js
levenshtein function in javascript
function levenshtein(s1, s2) {
// http://kevin.vanzonneveld.net
// + original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com)
// + bugfixed by: Onno Marsman
// + revised by: Andrea Giammarchi (http://webreflection.blogspot.com)
// + reimplemented by: Brett Zamir (http://brett-zamir.me)
// + reimplemented by: Alexander M Beedie
// * example 1: levenshtein('Kevin van Zonneveld', 'Kevin van Sommeveld');
// * returns 1: 3
@Marak
Marak / mockreadwritestream.js
Created May 20, 2011 06:29 — forked from indexzero/mockreadwritestream.js
A mock stream for node.js that is both Readable and Writeable.
var events = require('events'),
util = require('util');
var MockReadWriteStream = helpers.MockReadWriteStream = function () {
//
// No need to do anything here, it's just a mock.
//
};
util.inherits(MockReadWriteStream, events.EventEmitter);