Skip to content

Instantly share code, notes, and snippets.

@abriening
abriening / fixtures.js
Created October 4, 2013 13:09
Loads html fixtures for javascript "unit" testing. Works with FireFox and fixtures in the same folder (will get same-origin-policy errors otherwise). Works with mocha/qunit/jasmine via phantom. I should remove dependency on jQuery ($ parameter).
function Fixtures($) {
var id, container;
function setup(files) {
for(var i = 0; i < files.length; i++) {
load(files[i])
}
}
function createContainer() {
@abriening
abriening / coverage.diff
Last active January 4, 2016 21:29
simplecov for rails
diff --git a/.gitignore b/.gitignore
index e2aa052..9a467fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,12 +5,12 @@
# git config --global core.excludesfile ~/.gitignore_global
# Ignore bundler config
-/.bundle
+.bundle/
function observer(){
var observers = [];
return {notify: notify, subscribe:subscribe}
function subscribe(callback){
observers.push(callback);
var i = observers.length - 1;
return function(){
observers[i] = function(){}
}
@abriening
abriening / default.conf
Created February 19, 2018 18:36
Default nginx route, close connection.
server {
listen 80 default_server;
server_name _;
return 444;
}