Skip to content

Instantly share code, notes, and snippets.

View danroberts's full-sized avatar

danroberts

View GitHub Profile
@danroberts
danroberts / po2json.js
Created May 31, 2012 21:27 — forked from zaach/po2json.js
PO parser from http://jsgettext.berlios.de/lib/Gettext.js adapted for Node.js and modified to be more like po2json.pl
#!/usr/bin/env node
/*
PO parser from http://jsgettext.berlios.de/lib/Gettext.js
adapted for Node.js and modified to be more like po2json.pl
- Zach Carter <[email protected]>
Further adapted to be used inside a node.js environment instead of the command line. Import with a require statement:
var po2json = require('po2json.js')
po2json.parse('filename', function(result) {
@danroberts
danroberts / backbone.$super.js
Created October 11, 2012 20:53 — forked from borestad/backbone.$super.js
super call within Backbone.js - adding multiple levels of inheritance.
var $super = function(funcName){
funcName = funcName || 'initialize';
// _.bindAll messes upp constructor
// TODO: Add more tests with multiple inheritance
var _super = this.constructor.__super__ || this.__proto__.constructor.__super__;
return _super[funcName].apply(this, _.rest(arguments));
},
_$super = function(funcName){
funcName = funcName || 'initialize';
@danroberts
danroberts / Git branch in bash prompt
Created November 10, 2012 17:25
Adds your git branch to the bash prompt
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* (.*)/[$(parse_git_dirty)]/"
}
export PS1='\u@\h \e[1;33m\w\e[0m $(parse_git_branch)$ '
npm http GET https://registry.npmjs.org/socket.io
npm http 304 https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/socket.io-client/0.9.11
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/base64id/0.1.0
npm http GET https://registry.npmjs.org/redis/0.7.3
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.11
npm http 304 https://registry.npmjs.org/base64id/0.1.0
npm http 304 https://registry.npmjs.org/redis/0.7.3
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
// While you can edit this file, it's best to put your changes in
// "User/Preferences.sublime-settings", which overrides the settings in here.
//
// Settings may also be placed in file type specific options files, for
// example, in Packages/Python/Python.sublime-settings for python files.
{
// Sets the colors used within the text area
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
// Note that the font_face and font_size are overriden in the platform
{
"id":1780,
"style":{
},
"title":"Untitled",
"screenshot_url":null,
"datasets":[
{
"created_at":"2013-10-21T13:38:04-04:00",
#!/bin/sh
# 5:23 PM Friday, October 18, 2013 - Jim Priest
# origin script found here: http://python.dzone.com/articles/tips-using-git-pre-commit-hook
# Modified with console checks and to ignore commented file
FILES_PATTERN='\.(js|coffee)(\..+)?$'
FORBIDDEN='ddescribe\|iit\|console\.log'
if git diff --cached --name-only | grep -E -q $FILES_PATTERN ;
then
@danroberts
danroberts / README.md
Last active October 23, 2015 22:44 — forked from mbostock/.block
Grouped Bar Chart with Crossfilter

This is a fork of mbostock's grouped bar chart example, to demonstrate how to use crossfilter to produce the same result.

This grouped bar chart is constructed from a CSV file storing the populations of different states by age group. The chart employs conventional margins and a number of D3 features:

@danroberts
danroberts / bumpme
Last active February 2, 2017 22:28
Thu Feb 2 22:28:37 UTC 2017
---
resource_types:
- name: perforce
type: docker-image
source:
repository: svartulv/p4-resource
resources:
- name: p4
type: perforce