Skip to content

Instantly share code, notes, and snippets.

View wolfeidau's full-sized avatar
🐺
Building data science projects

Mark Wolfe wolfeidau

🐺
Building data science projects
View GitHub Profile
@wolfeidau
wolfeidau / gist:2341170
Created April 9, 2012 03:24
where ruby.exe output
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\markw>where ruby.exe
C:\RailsInstaller\Ruby1.9.3\bin\ruby.exe
C:\Users\markw>
@wolfeidau
wolfeidau / gist:2478613
Created April 24, 2012 10:19
strace of active record require and fopen calls.
markw@markw-VirtualBox:~/Code/Ruby/testloadapp$ strace -eopen ruby -r active_record -e ActiveRecord::Base 2>&1 | wc -l
3462
markw@markw-VirtualBox:~/Code/Ruby/testloadapp$ strace -eopen ruby -r ./config/environment -e ActiveRecord::Base 2>&1 | wc -l
30873
markw@markw-VirtualBox:~/Code/Ruby/testloadapp$
https://gist.github.com/2478613
@wolfeidau
wolfeidau / gist:2484471
Created April 24, 2012 23:05
Building ruby with some dtrace
# install libyaml via homebrew cause I can't be bothered going and finding it.
brew install libyaml
# going to work in my versions dir, will remove sources afterwards..
cd /Users/markw/.rbenv/versions
# clone ruby goodness
git clone https://github.com/tenderlove/ruby.git
# checkout the probes branch
@wolfeidau
wolfeidau / gist:2486226
Created April 25, 2012 04:05
If you installed 1.9.3-p125 update your rubygems.
ruby -v
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0]
gem -v
1.8.11
time ruby -r active_record -e ActiveRecord::Base
2.05s user 0.05s system 99% cpu 2.101 total
gem -v
@wolfeidau
wolfeidau / gist:2757480
Created May 20, 2012 09:28
Erlang running on Netgear WNDR3800
root@OpenWrt:~# erl
Erlang R15B01 (erts-5.9.1) [source] [async-threads:0] [kernel-poll:false]
Eshell V5.9.1 (abort with ^G)
1> erlang:system_info(system_architecture).
"mips-openwrt-linux-gnu"
2> q().
ok
3> root@OpenWrt:~# uname -a
Linux OpenWrt 3.3.6 #1 Sun May 20 15:43:19 EST 2012 mips GNU/Linux
@wolfeidau
wolfeidau / gist:2766543
Created May 22, 2012 04:24
atlas-mvn error
$ java -version
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)
$ which atlas-mvn
/home/markw/Applications/atlassian-plugin-sdk-3.10.3/bin/atlas-mvn
$ atlas-mvn
Executing: /home/markw/Applications/atlassian-plugin-sdk-3.10.3/apache-maven/bin/mvn
Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher
Caused by: java.lang.ClassNotFoundException: org.codehaus.classworlds.Launcher
@wolfeidau
wolfeidau / gist:2780035
Created May 24, 2012 07:33
HTTP Perf commands
/usr/local/bin/httperf --server=10.0.64.198 --port=8080 --uri=/hello/mark --num-conns=10 --num-calls=100
/usr/local/bin/httperf --server=10.0.64.198 --port=3000 --uri=/hello/mark --num-conns=10 --num-calls=100
@wolfeidau
wolfeidau / gist:2910824
Created June 11, 2012 15:58
Missing colusion

So due to a missing error handler we had indeed tombstoned a large amount of state within the erlang runtime in situations where connections had timed out or been reset.

AWS Example

For example, imagine that you want to sign the following request:

PUT /quotes/nelson HTTP/1.0
Content-Md5: c8fdb181845a4ca6b8fec737b3581d76
Content-Type: text/html
Date: Thu, 17 Nov 2005 18:49:58 GMT
X-Amz-Meta-Author: [email protected]

X-Amz-Magic: abracadabra

@wolfeidau
wolfeidau / .screenrc
Created August 6, 2012 04:14
Basic screen configuration file.
termcapinfo xterm* ti@:te@
startup_message off
vbell off
autodetach on
altscreen on
shelltitle "$ |bash"
defscrollback 10000
defutf8 on
nonblock on