Skip to content

Instantly share code, notes, and snippets.

View jwhitley's full-sized avatar
🏝️
balearic

John Whitley jwhitley

🏝️
balearic
View GitHub Profile
==> Downloading http://ftp.gnu.org/pub/gnu/emacs/emacs-23.3.tar.bz2
File already downloaded and cached to /Users/whitley/Library/Caches/Homebrew
/usr/bin/tar xf /Users/whitley/Library/Caches/Homebrew/emacs-23.3.tar.bz2
==> Downloading patches
/usr/bin/curl -f#LA Homebrew 0.8 (Ruby 1.8.7-174; Mac OS X 10.6.7) https://github.com/downloads/typester/emacs/feature-fullscreen.patch -o 001-homebrew.diff
######################################################################## 100.0% ######################################################################## 100.0% ######################################################################## 100.0% 0.0% ###### 9.3% #################### 28.0% ################################# 46.8% ###############################################
var markGroup = dataGroup.selectAll(".mark")
.data(flatData).enter()
.append("svg:g")
.attr("class","mark");
markGroup.append("svg:rect").
attr("x", function (d,i) { return x(i); }).
attr("y", 0).
attr("class", targetStyle(this.kind)).
attr("width", widthFunc(this)).
#!/bin/zsh
# VOLume Toggle => volt
#
# Usage: volt <volume>
# This script toggles the mountedness of the specified OS X disk
# volume using diskutil. The volume may be specified as the first
# parameter, or as the name of a symlink to this script.
volume=${1:=${0:t}}
@jwhitley
jwhitley / pow
Created October 7, 2011 03:09
A helper script for pow.cx users
#!/usr/bin/env ruby
require 'fileutils'
require 'optparse'
class String
def unindent
gsub /^#{self[/\A\s*/]}/, ''
end
end
@jwhitley
jwhitley / datafile.json
Created October 20, 2011 16:30 — forked from wimdows/datafile.json
a very simple pie chart
{"scores": [ {"naam":"David",
"comp":3,
"thingy": 80,
"parts": [{"test": "3", "score": 7},
{"test": "4", "score": 12},
{"test": "5", "score": 12}]
},
{"naam":"David",
"comp":2,
"thingy": 100,
>> coffee nan.js.coffee
Error: In nan.js.coffee, Parse error on line NaN: Unexpected 'MATH'
at Object.parseError (/opt/hb/lib/node_modules/coffee-script/lib/parser.js:472:11)
at Object.parse (/opt/hb/lib/node_modules/coffee-script/lib/parser.js:548:22)
at /opt/hb/lib/node_modules/coffee-script/lib/coffee-script.js:29:22
at Object.run (/opt/hb/lib/node_modules/coffee-script/lib/coffee-script.js:57:34)
at /opt/hb/lib/node_modules/coffee-script/lib/command.js:147:29
at /opt/hb/lib/node_modules/coffee-script/lib/command.js:115:26
at [object Object].<anonymous> (fs.js:107:5)
at [object Object].emit (events.js:61:17)
# alias a command only if the alias name isn't a command
weak_alias () {
if [[ -z "`whence ${1[(ws:=:)1]}`" ]]; then
alias $1
fi
}
# alias a command only if the alias target exists
alias_if_exist () {
if [[ -n "`whence ${1[(ws:=:)2]}`" ]]; then
{
baseUrl: '/path/to/rails_root/tmp/assets',
dir: '/path/to/rails_root/public/assets',
modules: [
{ name: 'application' },
{ name: 'users' }
],
fileExclusionRegExp: /.?/,
paths: {
d3: 'd3/d3',
// Run me as 'node nested_function.js'
var some_text = [ "a", "b", "c"];
var printit = function (text, f) {
console.log(text);
f();
}
var nested = some_text.reduceRight(function(prev, curr) {
//Load the requirejs optimizer
var requirejs = require('/Users/whitley/src/requirejs-rails/bin/r.js'),
//Set up basic config, include config that is
//common to all the optimize() calls.
basConfig = {
"baseUrl": "/Users/whitley/src/foo/tmp/assets",
"modules": [
{
"name": "application"
},