Skip to content

Instantly share code, notes, and snippets.

Not your keys, not your coins.

Steven Black StevenBlack

Not your keys, not your coins.
View GitHub Profile
View nodejs-cheatsheet.js
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download:
// More:
// 0. Synopsis.
View gist:170202c0c25c3928d5ecc34c5df9b540
2-3 times per night
post issues to Slack
designate scrum master and rotate who the master will be
scrum master gives everyone a turn to speak
Write down your conflict
Spend 15 minutes tops to resolve the conflict and move on.
We are all on the same team with the same goal
View jsonball.rb
require 'json'
require 'net/http'
# JSON parser tag, creating map for use in jekyll markdown
# Alex.Heneveld @ Cloudsoft Corp (remove spaces and add the .com)
# Released under APL 2.0
# usage: {% jsonball varname from TYPE PARAM %}
# where TYPE is one of {data,var,file,page}, described below
View Agou setup
- [ ] Install ITerm2 app –
- [ ] Install Sublime Text app – and the `subl` command line tool
- [ ] Install MacDown app –
- [ ] Update Chrome to latest
- [ ] Install Chrome extension: Web Developer Toolbar
- [ ] Install Ruby Version Manager (RVM) –
- [ ] Install Ruby latest
- [ ] Install Jekyll (ruby Gem) –
- [ ] Create an account at
- [ ] Install git
StevenBlack /
Created Sep 23, 2016 — forked from branneman/
Better local require() paths for Node.js

Better local require() paths for Node.js


When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

StevenBlack / sessionfactory.prg
Last active Jun 22, 2016
SessionFactory creates objects that are wrapped in a private data session. Note that the factory can die but its private datasession lives until all its products are out of scope.
View sessionfactory.prg
DEFINE CLASS SessionFactory AS Session
DataSession = 2 && private
StevenBlack / gist:4702345
Created Feb 3, 2013
Twitter search for Jekyll, the blog aware site generator
View gist:4702345
lang:en filter:links jekyll -rt -hyde -hide -movie -NBC -island -jekyll_hydee -jekyll_andhyde -jekyll_.{1-} -*\_jekyll -_Dr__Jekyll_ -Jekyll.{1-} -henry_jekyll -lemonade_jekyll -W{1-}jekyll -watching -jekyll_hyde96 -jackie_jekyll
StevenBlack / crosstab.sql
Created May 12, 2016 — forked from romansklenar/crosstab.sql
PostgreSQL "pivot table" example using tablefunc extension
View crosstab.sql
CREATE TABLE sales(year int, month int, qty int);
INSERT INTO sales VALUES(2007, 1, 1000);
INSERT INTO sales VALUES(2007, 2, 1500);
INSERT INTO sales VALUES(2007, 7, 500);
INSERT INTO sales VALUES(2007, 11, 1500);
INSERT INTO sales VALUES(2007, 12, 2000);
INSERT INTO sales VALUES(2008, 1, 1000);
INSERT INTO sales VALUES(2009, 5, 2500);

Discussion on reddit.

Each of these commands will run an ad hoc http static file server in your current (or specified) directory. Use this power wisely.

Python 2.x

$ python -m SimpleHTTPServer 8000
StevenBlack / git.rb
Created Jun 2, 2013 — forked from alx/git.rb
Jekyll plugin to add Git activity inside a list
View git.rb
require 'git'
module Jekyll
class GitActivityTag < Liquid::Tag
def initialize(tag_name, text, tokens)
def render(context)
You can’t perform that action at this time.