Skip to content

Instantly share code, notes, and snippets.

@henrik
henrik / fake_server.coffee
Last active May 2, 2016 22:36
Stuff extracted from writing Konacha/Mocha/Chai/Sinon unit tests.
describe "Using a fake server for Ajax", ->
server = null
beforeEach -> server = sinon.fakeServer.create()
afterEach -> server.restore()
context "when Ajax succeeds", ->
beforeEach -> respondWithJSON("/url/123", 200, '{"city": "Palm Springs"}')
it "does stuff", ->
server.respond()
@mkdynamic
mkdynamic / bundles.sh
Created June 18, 2010 02:31
Install all of http://github.com/phuibonhoa's TM bundles (OS X only)
#!/usr/bin/env bash
#
# install all of http://github.com/phuibonhoa's TM bundles (OS X only)
#
echo "Installing bundles..."
# backup dir
if [ -d ~/desktop/_tm_bundle_backups ]; then rm -rf ~/desktop/_tm_bundle_backups; fi