Skip to content

Instantly share code, notes, and snippets.

var JAKE = require("jake");
var FILE = require("file");
var narcissusPath = FILE.path(require("packages").catalog.narcissus.directory);
JAKE.task("default", function() {
var script = exports.bundle([
{ id : "narcissus/defs", path : narcissusPath.join("lib", "narcissus", "defs.js") },
{ id : "narcissus/parse", path : narcissusPath.join("lib", "narcissus", "parse.js") },
{ id : "narcissus/format", path : narcissusPath.join("lib", "narcissus", "format.js") }
/*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*/
(function(){
var UPC_SET = {
"3211": '0',
"2221": '1',
"2122": '2',
Here's a quick and dirty bash_completion script. Paste this in a file named "google" in your /etc/bash_completion.d/ directory:
_google()
{
local cur prev commands options
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
commands="help picasa blogger youtube docs contacts calendar"
if [[ $COMP_CWORD -eq 1 ]] ; then
@zaach
zaach / def.js
Created July 14, 2010 03:42 — forked from tbtlr/def.js
/*
* def.js: Simple Ruby-style inheritance for JavaScript
*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*
*
* Example:
*
* def ("Person") ({
var HTTPParser = process.binding('http_parser').HTTPParser;
var net = require('net');
var path = require('path');
var sys = require('sys');
var Worker = require('webworker/webworker').Worker;
var VHOSTS = ['foo.bar.com', 'baz.bizzle.com'];
var WORKERS = {};
VHOSTS.forEach(function(vh) {
.mouse{
position: absolute;
background-image: url('../images/cursor.png');
width: 15px;
height: 22px;
z-index: 100;
}
#
# Cookbook Name:: nodejs
# Recipe:: default
#
if ['solo'].include?(node[:instance_role])
nodejs_file = "node-v0.1.101.tar.gz"
nodejs_dir = "node-v0.1.101"
nodejs_url = "http://nodejs.org/dist/#{nodejs_file}"
/Users/zach/repos/handlebars.js/spec/spec_helper.rb:54:in `block in <module:Spec>': undefined method `[]=' for nil:NilClass (NoMethodError)
from /Users/zach/repos/handlebars.js/spec/spec_helper.rb:53:in `instance_eval'
from /Users/zach/repos/handlebars.js/spec/spec_helper.rb:53:in `<module:Spec>'
from /Users/zach/repos/handlebars.js/spec/spec_helper.rb:31:in `<module:Handlebars>'
from /Users/zach/repos/handlebars.js/spec/spec_helper.rb:30:in `<top (required)>'
from /Users/zach/repos/handlebars.js/spec/acceptance_spec.rb:1:in `require'
from /Users/zach/repos/handlebars.js/spec/acceptance_spec.rb:1:in `<top (required)>'
from /Users/zach/.rvm/gems/ruby-1.9.1-p378/gems/rspec-core-2.2.1/lib/rspec/core/configuration.rb:327:in `load'
from /Users/zach/.rvm/gems/ruby-1.9.1-p378/gems/rspec-core-2.2.1/lib/rspec/core/configuration.rb:327:in `block in load_spec_files'
from /Users/zach/.rvm/gems/ruby-1.9.1-p378/gems/rspec-core-2.2.1/lib/rspec/core/configuration.rb:327:in `map'
@zaach
zaach / handlebars.l
Created December 13, 2010 00:18
Handlebars.js lexer using start conditions
%x mu
%%
.+?/("{{") { this.begin('mu'); return 'CONTENT'; }
/("{{") { this.begin('mu'); }
.+ { return 'CONTENT'; }
<mu>"{{>" { return 'OPEN_PARTIAL'; }
<mu>"{{#" { return 'OPEN_BLOCK'; }
@zaach
zaach / dn
Created June 3, 2011 03:54
simple script for daily note taking
#!/usr/bin/env sh
# for daily note taking and todo enumerating
if [ ! -e ~/.daily-note ]
then mkdir ~/.daily-note
fi
cd ~/.daily-note
FILE=`date "+%Y-%m-%d"`