Skip to content

Instantly share code, notes, and snippets.

View indutny's full-sized avatar
🐋
Thanks for the fish!

Fedor Indutny indutny

🐋
Thanks for the fish!
View GitHub Profile
/*
* def.js: Простое наследование в стиле Ruby для Javascript
*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*/
(function(global) {
// Используется, чтобы сохранить суперкласс и "плагины" ля
// дальнейшего использования
@indutny
indutny / gist:703211
Created November 17, 2010 09:59
Node.js runInNewContext problem
var vm = require('vm');
var pseudo_array = vm.runInNewContext('[]');
console.log(pseudo_array instanceof Array); // Voila! "false"
@indutny
indutny / .gitconfig
Created November 18, 2010 18:40 — forked from asrail/.gitconfig
[user]
name = ...
email = ...
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
@indutny
indutny / ExeLDR.asm
Created December 31, 2010 22:31
Loader for MSDOS EXE files, without MSDOS
;Made by FeDOS (FeDOS SubSystems)
;All Rights Reserved
;FeDOS (ICQ 313-997-813)
[BITS 16]
[ORG 0x0000]
__start:
; mov cx, 0xB800
; mov es, cx
; mov bx, 0h
; mov cx, cs
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
function thatYouWantToExport() {
};
if (typeof exports === 'undefined') {
window.myFn = thatYouWantToExport;
} else {
exports.myFn = thatYouWantToExport;
}
@indutny
indutny / pipeaccept.js
Created May 22, 2011 20:19 — forked from heapwolf/pipeaccept.js
accepting input from a pipe, nodejs
var data = '';
if (process.stdin.writable) {
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk) {
data += chunk;
});
@indutny
indutny / gist:1034033
Created June 19, 2011 10:05
Install npm
curl http://npmjs.org/install.sh | sh
on('leave.drinker-name', function() {
// here
});