Skip to content

Instantly share code, notes, and snippets.

🐋
Thanks for the fish!

Fedor Indutny indutny

🐋
Thanks for the fish!
Block or report user

Report or block indutny

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View def.js
/*
* 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 Nov 17, 2010
Node.js runInNewContext problem
View gist:703211
var vm = require('vm');
var pseudo_array = vm.runInNewContext('[]');
console.log(pseudo_array instanceof Array); // Voila! "false"
View .gitconfig
[user]
name = ...
email = ...
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
@indutny
indutny / ExeLDR.asm
Created Dec 31, 2010
Loader for MSDOS EXE files, without MSDOS
View ExeLDR.asm
;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
View 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;
View gameengines.md

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
View nodeandbrowser.js
function thatYouWantToExport() {
};
if (typeof exports === 'undefined') {
window.myFn = thatYouWantToExport;
} else {
exports.myFn = thatYouWantToExport;
}
@indutny
indutny / pipeaccept.js
Created May 22, 2011 — forked from heapwolf/pipeaccept.js
accepting input from a pipe, nodejs
View pipeaccept.js
var data = '';
if (process.stdin.writable) {
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk) {
data += chunk;
});
View gist:1034033
curl http://npmjs.org/install.sh | sh
View drinker-name.js
on('leave.drinker-name', function() {
// here
});
You can’t perform that action at this time.