This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var assert = require('assert') | |
, db = require('../db')({namespace:'bookmarks-test-db'}) | |
, the_bookmark = {} | |
require('vows') | |
.describe('bookmarks-db') | |
.addBatch({ | |
"Initialize": { | |
topic: function () { | |
db.deleteAll(this.callback); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express') | |
, app = module.exports = express.createServer() | |
app.configure(function () { | |
app.set('views', __dirname + '/views'); | |
app.set('view engine', 'jade'); | |
app.use(app.router); | |
app.use(express.static(__dirname + '/public')); | |
}); | |
app.configure('development', function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Requirements: sed, grep, curl, pkill | |
# User configuration | |
LOCAL_INSTALL="/usr/lib/sublime-text-2" # Must be user-writable | |
REPO="dev" # "dev" for dev releases, or "2" for beta releases | |
TARGET_BUILD="Linux 32 bit" # can be one of "Windows", "Windows 64 bit", "OS X", "Linux 32 bit", "Linux 64 bit" | |
# Check if sublime text is running |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
this.MysqlBinlogTailer = MysqlBinlogTailer; | |
var EventEmitter = require('events').EventEmitter; | |
var fs = require('fs'); | |
var path = require('path'); | |
/** | |
* Tails a Mysql binlog and emits an event for every query executed. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: svn-annotate file [start-line [end-line]] | |
# Will output svn annotate on file + line numbers | |
# eventually cut depending on the given lines | |
function svn-annotate() { | |
# Work on a tempfile to avoid broken pipe | |
f=$(tempfile) | |
svn annotate "$1" > $f | |
CAT="cat -n" # Integrate line numbers, just remove the "-n" to disable | |
if [ "$2" == "" ]; then | |
# No start or end line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# <troll>If you don't have bash, go get a real OS.</troll> | |
curl -s "http://md5.noisette.ch/md5.php?hash=$(curl -s http://live.free.fr | gunzip | tail -n 36 | head -n 32 | grep '[a-f0-9]' -o | xargs echo -n | sed 's/ //g')" | grep '<string>' | sed 's/^.*\[CDATA\[\(.*\)\]\].*$/\1/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -H 'Content-Type: application/json' -X POST http://localhost:5984/_replicate -d ' {"source": "http://isaacs.iriscouch.com/registry", "target": "npmregistry", "create_target": true, "continuous": true} ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/mozilla/browserid/wiki/Advanced-BrowserID-Features | |
function login () { | |
function gotAssertion (assertion) { | |
if (assertion) { | |
// User chose not to log in, or an error occurred | |
} else { | |
// Ajax call to server to check email | |
} | |
} |