Skip to content

Instantly share code, notes, and snippets.

@Contejious
Contejious / gist:2122925
Created March 19, 2012 18:26
index boot strapper sans timing issue
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="require.js"></script>
<script type="text/javascript">
(function(){
var baseUrl= "/";
require.config({
baseUrl: baseUrl
function getConfigVal(key, defaultValue){
if(localStorage.getItem('fixtureMode') === true){
var localStorageValue = localStorage.getItem(key);
if(localStorageValue == null){
return defaultValue;
}
else{
return localStorageValue;
}
}
@Contejious
Contejious / gist:1950857
Created March 1, 2012 16:07
vimrc mocha
:let g:session_autoload = 0
map <leader>t :echo system("osascript ~/sendCommand.scpt specs_local \"cd " . getcwd() . "\nwhile [ ! -f test/mocha.opts ]; do cd ..; done\nclear\n mocha -R spec " . expand("%:p:h") . "/**/*.spec.coffee\n\"")<CR>
map <leader>T :echo system("osascript ~/sendCommand.scpt specs_all \"cd " . getcwd() . "\nwhile [ ! -f test/mocha.opts ]; do cd ..; done\nclear\n mocha -R progress **/*.spec.coffee\n\"")<CR>
map <leader>d :echo system("osascript ~/sendCommand.scpt specs_local \"cd " . getcwd() . "\nwhile [ ! -f test/mocha.opts ]; do cd ..; done\nclear\n mocha debug -R spec " . expand("%:p:h") . "/**/*.spec.coffee\n\" focus")<CR>
map <leader>D :echo system("osascript ~/sendCommand.scpt specs_local \"cd " . getcwd() . "\nwhile [ ! -f test/mocha.opts ]; do cd ..; done\nclear\n mocha -R spec --debug-brk " . expand("%:p:h") . "/**/*.spec.coffee\n\"")<CR>
map <leader><Space>t :echo system("osascript ~/sendZoom.scpt specs_local")<CR>
map <leader><Space>T :echo system("osascript ~/sendZoom.scpt
@Contejious
Contejious / gist:964555
Created May 10, 2011 14:17
Jasmine on Railcasts
http://railscasts.com/episodes/261-testing-javascript-with-jasmine