Skip to content

Instantly share code, notes, and snippets.

Keith Rosenberg netpoetica

Block or report user

Report or block netpoetica

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
dmnsgn / .eslintrc.js
Created Jul 23, 2015
.eslintrc Google JavaScript Style Guide (eslint v0.24.1)
View .eslintrc.js
"env": {
"browser": true, // browser global variables.
"node": false, // Node.js global variables and Node.js-specific rules.
"worker": false, // web workers global variables.
"amd": false, // defines require() and define() as global variables as per the amd spec.
"mocha": false, // adds all of the Mocha testing global variables.
"jasmine": false, // adds all of the Jasmine testing global variables for version 1.3 and 2.0.
jashkenas /
Last active Feb 22, 2020
Why Semantic Versioning Isn't

Spurred by recent events (, this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.

For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.

But Semantic Versioning (henceforth, SemVer), as specified at, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.

SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil

kevincennis /
Last active Feb 25, 2020
V8 Installation and d8 shell usage

Installing V8 on a Mac


  • Install Xcode (Avaliable on the Mac App Store)
  • Install Xcode Command Line Tools (Preferences > Downloads)
  • Install depot_tools
    • git clone
    • sudo nano ~/.bash_profile
    • Add export PATH=/path/to/depot_tools:"$PATH" (it's important that depot_tools comes first here)
substack / par_server.js
Created Mar 30, 2014
co + thunkify http servers
View par_server.js
// parallel steps
var co = require('co');
var http = require('http');
var fs = require('fs');
var thunkify = require('thunkify');
var server = http.createServer(co(function *(req, res) {
var files = yield {
a: thunkify(fs.readFile)('a.txt'),
ejdyksen / mini-console.html
Last active Sep 18, 2017
A tool for getting at a JS console when there is none available.
View mini-console.html
<div id="consolelog" style="font-family: 'Courier New', Courier, monospace; font-size: 12px; margin: 40px 30px 0px; background-color: white; border: 2px solid black; padding: 10px;"></div>
<input type="text" id="consoleinput" style="margin: 0px 30px; width: 400px;" onkeypress="return evalConsoleInput(event, this.value);" />
<script type="text/javascript">
var appendConsole = function(message, type) {
var color = "black";
if (type === "error") {
color = "red";
} else if (type === "debug") {
View guid_generator
function S4() {
return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
function guid() {
return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
tedmiston / nodejs-tcp-example.js
Last active Feb 27, 2020
Node.js TCP client and server example
View nodejs-tcp-example.js
In the node.js intro tutorial (, they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
var net = require('net');
dweekly / gist:5873953
Last active Dec 19, 2015
Get Emscripten Running on OS X 10.8
View gist:5873953
# Based on
# prerequisites
cd ~/
brew install node
sudo ln -s /usr/bin/python2.7 /usr/bin/python2
curl > llvm.tgz
tar xzvf llvm.tgz
ln -s clang+llvm-3.2-x86_64-apple-darwin11 llvm
james2doyle / scrollTo.js
Last active Dec 12, 2019
a native scrollTo function in javascript that uses requestAnimationFrame and easing for animation
View scrollTo.js
// easing functions
Math.easeInOutQuad = function (t, b, c, d) {
t /= d/2;
if (t < 1) {
return c/2*t*t + b
return -c/2 * (t*(t-2) - 1) + b;
View gist:5588256
BIN = ./node_modules/.bin
SRC = $(wildcard src/*.coffee)
LIB = $(SRC:src/
build: $(LIB)
lib/%.js: src/
@mkdir -p $(@D)
@$(BIN)/coffee -bcp $< > $@
You can’t perform that action at this time.