Skip to content

Instantly share code, notes, and snippets.

@timtyrrell
timtyrrell / mocha-jsdom-test.js
Last active September 3, 2015 00:56 — forked from silvenon/mocha-jsdom-test.js
Mocha setup I use for testing React with jsdom.
import jsdom from 'jsdom';
import assert from 'assert';
describe('suite', () => {
let React, utils, Component;
before(() => {
global.document = jsdom.jsdom('<!DOCTYPE html><html><head></head><body></body></html>');
global.window = document.parentWindow;
global.navigator = {userAgent: 'node.js'};
@timtyrrell
timtyrrell / voices
Created April 29, 2011 20:35 — forked from djohnsonjr/voices
Hear all of the voices on the mac from IRB
# drop in irb
voices = ["Agnes", "Kathy", "Princess", "Vicki", "Victoria", "Bruce", "Fred",
"Junior", "Ralph", "Albert", "Bad News", "Bahh", "Bells", "Boing", "Bubbles",
"Cellos", "Deranged", "Good News", "Hysterical", "Pipe Organ", "Trinoids", "Whisper", "Zarvox"]
statement = "balls"
voices.each do |v|
`say -v #{v} #{statement}`