Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
| require 'new_relic/agent/method_tracer' | |
| class NR | |
| # Convenience method for adding NewRelic tracing around specific methods of interest. | |
| # | |
| # Note about performance: | |
| # | |
| # " CAUTION - adding probes to your code adds overhead. | |
| # Each probe burns about 20 microseconds of CPU. | |
| # Be careful not to probe a method that's called frequently in a loop. " |
Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.
| alias server='open http://localhost:8000 && python -m SimpleHTTPServer' |
| # | |
| # Eric Lindvall <eric@5stops.com> | |
| # | |
| # Update the process name for the process you're running in. | |
| # | |
| # This will allow top, lsof, and killall to see the process as the | |
| # name you specify. | |
| # | |
| # Just use: | |
| # |
| #!/usr/bin/env ruby | |
| require 'pty' | |
| require 'socket' | |
| # pump([[reader, writer], ...]) | |
| # | |
| # Description: | |
| # pump() takes an array of arrays, with the first element of each being the read stream and the | |
| # second being the write stream. pump() itself is synchronous but it uses select() to |
| #!/usr/bin/env ruby | |
| # A quick and dirty implementation of an HTTP proxy server in Ruby | |
| # because I did not want to install anything. | |
| # | |
| # Copyright (C) 2009-2014 Torsten Becker <torsten.becker@gmail.com> | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining | |
| # a copy of this software and associated documentation files (the | |
| # "Software"), to deal in the Software without restriction, including | |
| # without limitation the rights to use, copy, modify, merge, publish, |