Skip to content

Instantly share code, notes, and snippets.

View gigafied's full-sized avatar

Taka Kojima gigafied

View GitHub Profile
@gigafied
gigafied / gist:1831065
Created February 14, 2012 22:27
Lots of execs in node
var commands = [];
commands.push("git -v");
commands.push("git -v");
commands.push("git -v");
commands.push("git -v");
commands.push("git -v");
commands.push("git -v");
commands.push("git -v");
@gigafied
gigafied / gist:1829852
Created February 14, 2012 20:10
EaselJS - Bitmap class sample
minion.define("easel.display", {
Bitmap : minion.extend("easel.DisplayObject", {
image: null,
snapToPixel: true,
init : function (imageOrUri) {
this.__super(imageOrUri);
@gigafied
gigafied / gist:1822865
Created February 14, 2012 02:47
npm-debug.log re: npm install [email protected]
info it worked if it ends with ok
verbose cli [ 'node', '/usr/local/bin/npm', 'install', '[email protected]' ]
info using [email protected]
info using [email protected]
verbose config file /Users/taka.kojima/.npmrc
verbose config file /usr/local/etc/npmrc
verbose config file /usr/local/lib/node_modules/npm/npmrc
verbose caching /Users/taka.kojima/Projects/tmp/node_modules/ender/package.json
verbose loadDefaults [email protected]
verbose cache add [ '[email protected]', null ]
@gigafied
gigafied / README.md
Created February 10, 2012 06:12 — forked from dlo/README.md
Array.remove prototype function

This is a small snippet that gives Javascript arrays the (much-needed) ability to remove elements based on value. Example:

items = [1,2,3,3,4,4,5];
items.remove(3); // => [1,2,4,4,5]
@gigafied
gigafied / gist:1766037
Created February 8, 2012 06:24
RED Boilerplate Features + Requirements

####Requirements:

  • Scalable module system. Ability to easily create and maintain modules/components for use in projects.

  • Base boilerplate simplified & stripped down to bare essentials.

  • JavaScript based. This gives any frontend dev the ability to contribute easily if they so desire.

  • Dependency management without kludging up project repos. Config files and whatnot should be checked into the repo, actual node modules or other dependencies, should not.

var app = express.createServer();
app.configure(function(){
app.set('views', this.root_dir + "/" + this.template_dir);
app.set('view engine', this.template_engine);
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.static(this.root_dir + "/" + this.static_dir));
});