Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| require File.expand_path('../boot', __FILE__) # etc. | |
| module Example | |
| class Application < Rails::Application | |
| # Helper for loading deeply nested environment config. | |
| def load_env(context, key, value) | |
| if value.is_a?(Hash) | |
| options = begin | |
| context.send(key) || ActiveSupport::OrderedOptions.new | |
| rescue |
| # | |
| # UPDATE for 10.10.4+: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs | |
| # just run "sudo trimforce enable" to activate the trim support from now on! | |
| # | |
| # Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/) | |
| # Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/ | |
| # | |
| # Looks for "Apple" string in HD kext, changes it to a wildcard match for anything | |
| # | |
| # Alternative to http://www.groths.org/trim-enabler-3-0-released/ |
Couldn't find the text of this for a while...
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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.