Skip to content

Instantly share code, notes, and snippets.


Luke Arduini luk-

View GitHub Profile
wolfeidau /
Last active Dec 17, 2015
Using node profiler util programs


So you have a program that is doing bad things and have isolated that to a test case, this guides you though using one of the tools bundled with node-profiler to read the v8 logs.

  • Install node-profiler into your project directory.
npm install profiler --from-git git://
View gist:5075355
My thoughts on writing tiny reusable modules that each do just one
thing. These notes were adapted from an email I recently sent.
If some component is reusable enough to be a module then the
maintenance gains are really worth the overhead of making a new
project with separate tests and docs. Splitting out a reusable
component might take 5 or 10 minutes to set up all the package
overhead but it's much easier to test and document a piece that is
timoxley / gist:4697136
Last active Dec 30, 2019
Things I learned about Voxel.JS today
View gist:4697136


  • block/voxel/cube -> mostly interchangeable. The minecrafty blocks you see on the screen.
  • chunk: is a piece of the world that contains voxels
  • AABB: bounding volume
  • voxeljs: not 100% consistent yet, 'voxel.js' also acceptable, but definitely not 'VoxelJS'.
  • dims: short for 'dimensions'. Perhaps obvious to some.


defunctzombie / app.js
Last active Dec 11, 2015
expressjs boilerplate
View app.js
var express = require('express');
var taters = require('taters');
var enchilada = require('enchilada');
var makeup = require('makeup');
var veto = require('veto');
var browserkthx = require('browserkthx');
var hbs = require('hbs');
// we set certain settings based on production or not
var kProduction = process.env.NODE_ENV === 'production';
remixz /
Last active Mar 25, 2020
GitHub for Cats

Full version out!

GitHub For Cats

Because cats just wanna have forks.


If you’re a cat, you probably haven’t heard of GitHub. Maybe your human companion has, but they don’t really know how to explain it to you. (Which, as a cat, is extremely frustrating.) GitHub is a website that allows content creators, whether it be via programming, blogging, or issue-reporting, to collaborate together and to learn from each other. It’s powered by a “distributed version control system” called git. A “distributed version control system” sounds pretty complicated, but it really isn’t. What it really means is that lets you, a cat, manage all of the stuff you have made (like maybe some JavaScript?) in one place, and be able to go back in time to see what you did before. It also lets other cats (or maybe humans) see what you’ve done, and help you out with it. This guide will get you introduced to the world of git and GitHub, and it might even

jhs / example.js
Created Dec 10, 2012
My Node.js modules these days
View example.js
// Short module explanation // Something to gather my thoughts
// // I think this looks cool.
module.exports = the_exported_function // Modules are a function. Always.
module.exports.extra = extra // Additional API entry points if
module.exports.other = other // desired.
var util = require('util') // Other packages from npm or core
var assert = require('assert') // No comma-first due to lots of
luk- / index.html
Created Nov 8, 2012 — forked from mbostock/.block
SVG Linear Gradient (D3)
View index.html
<!DOCTYPE html>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
var w = 960,
h = 500;
piscisaureus /
Created Aug 13, 2012
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

for i in $HOME/local/*; do
[ -d $i/bin ] && PATH="${i}/bin:${PATH}"
[ -d $i/sbin ] && PATH="${i}/sbin:${PATH}"
[ -d $i/include ] && CPATH="${i}/include:${CPATH}"
[ -d $i/lib ] && LD_LIBRARY_PATH="${i}/lib:${LD_LIBRARY_PATH}"
[ -d $i/lib ] && LD_RUN_PATH="${i}/lib:${LD_RUN_PATH}"
# uncomment the following if you use macintosh
# [ -d $i/lib ] && DYLD_LIBRARY_PATH="${i}/lib:${DYLD_LIBRARY_PATH}"
[ -d $i/lib/pkgconfig ] && PKG_CONFIG_PATH="${i}/lib/pkgconfig:${PKG_CONFIG_PATH}"
[ -d $i/share/man ] && MANPATH="${i}/share/man:${MANPATH}"