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
[ 1068.087883] We welcome our new Lua overlords! | |
[ 1068.089710] Lua from fib.lua:10946 | |
[ 1068.108374] Lua string is | |
[ 1068.108379] garbage 2816 | |
[ 1068.108383] garbage 2816 | |
[ 1068.130169] Lua string is | |
[ 1068.130174] garbage 4893 | |
[ 1068.130178] garbage 4893 | |
[ 1068.152191] Lua string is | |
[ 1068.152196] garbage 2816 |
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
function rbenv_prompt_info() { | |
local ruby_version | |
ruby_version=$(rbenv version 2> /dev/null) || return | |
echo "$ruby_version" | sed 's/[ \t].*$//' | |
} | |
alias rvm-prompt=rbenv_prompt_info | |
alias rvm_prompt_info=rbenv_prompt_info | |
export PS1="\n$RED\$(rbenv_prompt_info) $GREEN\w$EWHITE\$(vcprompt)$OFF \n→ " |
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
function rbenv_prompt_info() { | |
local ruby_version | |
ruby_version=$(rbenv version 2> /dev/null) || return | |
echo "$ruby_version" | sed 's/[ \t].*$//' | |
} | |
alias rvm-prompt=rbenv_prompt_info | |
alias rvm_prompt_info=rbenv_prompt_info |
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
→ dtruss ruby -e puts 'hello, world' | |
ruby: no -e allowed while running setuid (SecurityError) | |
SYSCALL(args) = return | |
issetugid(0x10CD52000, 0x5, 0x7FFF52EAD500) = 0 0 | |
geteuid(0x10CD52000, 0x5, 0x0) = 0 0 | |
csops(0x0, 0x0, 0x7FFF52EACFD4) = 0 0 | |
shared_region_check_np(0x7FFF52EAAF28, 0x2, 0x7FFF52EAAF28) = 0 0 | |
stat64("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x7FFF52EAC070, 0x7FFF52EAD040 = 0 0 | |
open("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x0, 0x0) = 3 0 | |
pread(0x3, "\312\376\272\276\0", 0x1000, 0x0) = 4096 0 |
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
# Colors from http://wiki.archlinux.org/index.php/Color_Bash_Prompt | |
# misc | |
NO_COLOR='\e[0m' #disable any colors | |
# regular colors | |
BLACK='\e[0;30m' | |
RED='\e[0;31m' | |
GREEN='\e[0;32m' | |
YELLOW='\e[0;33m' | |
BLUE='\e[0;34m' | |
MAGENTA='\e[0;35m' |
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
uby-1.9.3 ~/Downloads/ws (master *%) | |
→ make test0 | |
./server 8084 0 & | |
httperf --port=8084 --server=localhost --num-conns=1 | |
binding receive socket: Address already in use | |
httperf --client=0/1 --server=localhost --port=8084 --uri=/ --send-buffer=4096 --recv-buffer=16384 --num-conns=1 --num-calls=1 | |
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE | |
Maximum connect burst length: 0 | |
Total: connections 1 requests 0 replies 0 test-duration 0.000 s |
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
I'm using RestKit 0.10.2. | |
I have the following JSON data: | |
{ | |
"title":"2012 General Election: Romney vs. Obama", | |
"last_updated":"2012-01-02T17:08:44Z", | |
"estimates":[ | |
{ "choice":"Romney", "value":44.5 }, | |
{ "choice":"Obama", "value":46.6 } | |
], |
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
describe "Application 'Tests'" do | |
before do | |
@app = UIApplication.sharedApplication | |
end | |
it "has one window" do | |
@app.windows.size.should == 1 | |
end | |
describe "button controller" do |
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
__ ___ ___ __ | |
,-' '-.-' '-. .-' '-.-' '-, | |
_______,-' '-.____ '-. .-' ____.-' '-,_______ | |
| '-. \/ .-' | | |
/ `-._ |_____||_____| _.-' \ | |
/ | \ /| | | |\ / | \ | |
/ _|__'|_|____| |____|_|'__|_ \ | |
/| | | | | |\ | |
|___________| |___________| | |
______ | | | | ______ |
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
String::titleize = -> | |
titleized = this.split(" ") | |
UNCAPITALIZED = ['a', 'an'] | |
titleized = ( | |
for word, index in titleized | |
if word in UNCAPITALIZED && index != 0 | |
word | |
else | |
word[0].toUpperCase() + word.slice(1) if word |