Skip to content

Instantly share code, notes, and snippets.

@isao
isao / gist:3152563
Created July 20, 2012 18:55 — forked from haad/gist:1696065
proxychains4 homebrew formula
require 'formula'
class Proxychains < Formula
homepage 'https://github.com/haad/proxychains'
url 'https://github.com/haad/proxychains/tarball/proxychains-4.0.1'
sha1 '48911bf630dd293414f94e78d7dc7b0a1386b241'
def install
system './configure', '--prefix #{prefix}'
system 'make'
@isao
isao / add_origin.sh
Created July 25, 2012 01:13
use this to add the remote origin oh github based on the cwd
#!/bin/bash
git remote add origin [email protected]:$(git config --get github.user)/$(pwd).git
@isao
isao / runalltests.sh
Created August 2, 2012 23:01
run all tests from cwd, show only results
#!/bin/sh -e
# usage: $0 [optional arrow args]
# run all arrow tests from cwd and just display the results
err() {
echo "error: $2"; exit $1
}
which pgrep arrow >/dev/null || err 1 "missing executable(s)"
pgrep -f arrow_server >/dev/null || err 3 'arrow_server not running'
@isao
isao / git-moo.pl
Created August 2, 2012 23:32 — forked from drewfish/git-moo
"git moo" show hashes and commit distances for local and remote branches
#!/usr/bin/env perl
# @drewfish https://gist.github.com/3241991
#
# Show a nice table representing the differences between
# the local repo and remotes.
#
# It is assumed that there is a direct relationship between
# the local branch names and remote branch names.
#
# TODO
@isao
isao / arrow-server-startup.sh
Created August 6, 2012 22:21
func test daemon starter
#!/bin/sh -e
echo "starting arrow_server"
arrow_server &
sleep 2
echo "starting selenium"
jarf=$(ls /opt/brew/Cellar/selenium-server-standalone/2.*/selenium-server-standalone-2.*.jar | tail -1)
java -Dwebdriver.firefox.profile=default -jar $jarf
@isao
isao / gist:3372714
Created August 16, 2012 19:05
diff
Index: git-rel-pkg.sh
===================================================================
--- git-rel-pkg.sh (revision 83346)
+++ git-rel-pkg.sh (working copy)
@@ -16,7 +16,7 @@
[email protected]:yahoo/mojito.git # authenticated read/write public
gitdir=./mojito-$relnum
int_br=rel-$relnum # temp integration branch
-pkgjson=source/package.json
+pkgjson=package.json
@isao
isao / arrow-daemon-restart.sh
Created August 21, 2012 20:43
arrow daemon (re)starter
#!/bin/sh -e
pkill -fl arrow_server phantomjs 2>/dev/null && echo "killed arrow_server"
echo "starting arrow_server"
arrow_server &
sleep 1
echo "starting selenium"
jarf=$(brew ls selenium-server-standalone | grep .jar)
@isao
isao / gist:3421142
Created August 22, 2012 01:17
arrow and mojito-test.js
18:13isaodevelop% arrow --browser=phantomjs --logLevel ERROR unit/lib/app/addons/ac/test_descriptor.json
Failed mojito-analytics-addon tests onMozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.6.1 Safari/534.34
0 Passed, 2 Failed , 0 skipped
in testCaseyui_3_5_1_2_1345598089406_26
test setMergeFunction:Unexpected error: 'undefined' is not a constructor (evaluating 'new Y.mojito.addons.ac.analytics(null, null, mockAc)')
test stored analytics defers to meta addon for store and retrieve:Unexpected error: 'undefined' is not a constructor (evaluating 'new Y.mojito.addons.ac.analytics(null, null, mockAc)')
[2012-08-21 18:15:01.693] [ERROR] SeleniumDriver - Uncaught exception: Error Message => 'URL 'http://localhost:4459/arrow/static/Users/isao/Repos/mojito/myfork/tests/base/mojito-test.html' didn't load within 10000ms'
caused by Request => {"headers":{"Accept":"application/json; charset=utf-8","Connection":"keep-alive","Content-Length":"103","Content-Type":"applicati
@isao
isao / gist:3429137
Created August 22, 2012 20:41
cute js version of htmlencode
//http://news.ycombinator.com/item?id=4378741
return s(val).replace(re, function(t){
if( t == '>' ) return '&gt';
if( t == '<' ) return '&lt;';
if( t == '&' ) return '&amp;';
if( t == '"' ) return '&quot;';
return t;
});
@isao
isao / again
Created September 12, 2012 00:14
17:26isaodevelop% pwd
/Users/isao/Repos/mojito/myfork
17:26isaodevelop% npmls
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]