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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test Title</title> | |
<script src = "libraries/qunit-1.11.0/qunit-1.11.0.js"></script> | |
<script> | |
throw(new Error("Error!")); | |
</script> |
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
if (phantom.args.length === 0 || phantom.args.length > 2) { | |
console.log('Usage: run-qunit.js URL'); | |
phantom.exit(); | |
} | |
var page = new WebPage(); | |
// Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this") | |
page.onConsoleMessage = function(msg) { | |
console.log(msg); |
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
#!/usr/bin/ruby | |
# usage: git_match.rb <camel-characters> | |
GIT = 'git' | |
DIFF_OPT = 'diff' | |
TRACK_OPT = 'status -s -uno' #tracked files | |
def diff(arr) | |
arr.each { |gf| fork{ puts "#{gf}"; `#{GIT} #{DIFF_OPT} #{gf}` }} |
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/sh | |
cat /usr/share/dict/words | awk '{ print length($0) }' | sort -n | uniq -c | awk '{ print $1 }' | spark |
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
require 'rubygems' | |
require 'sinatra/async' | |
require 'thin' | |
class App < Sinatra::Base | |
register Sinatra::Async | |
@@clients = [] |