As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
| require 'test_helper' | |
| shared_examples_for 'An Adapter' do | |
| describe '#read' do | |
| before do | |
| @adapter.write(@key = 'whiskey', @value = "Jameson's") | |
| end | |
| it 'reads a given key' do | |
| @adapter.read(@key).must_equal(@value) |
| #To install ruby-debug on Ubuntu ruby-1.9.3 you need to download from http://rubyforge.org/frs/?group_id=8883 | |
| linecache19-0.5.13.gem | |
| ruby_core_source-0.1.5.gem | |
| ruby-debug19-0.11.6.gem | |
| ruby-debug-base19-0.11.26.gem | |
| #Then in your console | |
| export RVM_SRC=/your/path/to/ruby-1.9.3 |
| # If your workers are inactive for a long period of time, they'll lose | |
| # their MySQL connection. | |
| # | |
| # This hack ensures we re-connect whenever a connection is | |
| # lost. Because, really. why not? | |
| # | |
| # Stick this in RAILS_ROOT/config/initializers/connection_fix.rb (or somewhere similar) | |
| # | |
| # From: | |
| # http://coderrr.wordpress.com/2009/01/08/activerecord-threading-issues-and-resolutions/ |
| middle_name = case full_name | |
| when /^.*\s(.*)\s.*$/ | |
| $1 | |
| else | |
| "Peatrice" | |
| end |
| #include "cinder/app/AppBasic.h" | |
| #include "cinder/CinderMath.h" | |
| #include "cinder/gl/gl.h" | |
| using namespace ci; | |
| using namespace ci::app; | |
| using namespace std; | |
| class SuperFormulaApp : public AppBasic { | |
| public: |
| diff -u -r varnish-2.1.3/bin/varnishd/cache_dir_random.c varnish-quorum/bin/varnishd/cache_dir_random.c | |
| --- varnish-2.1.3/bin/varnishd/cache_dir_random.c 2010-03-24 09:44:13.000000000 +0000 | |
| +++ varnish-quorum/bin/varnishd/cache_dir_random.c 2010-10-07 18:22:42.506413284 +0000 | |
| @@ -75,6 +75,7 @@ | |
| enum crit_e criteria; | |
| unsigned retries; | |
| + double quorum_weight; | |
| double tot_weight; | |
| struct vdi_random_host *hosts; |
| # Sinatra minimalist RestMQ | |
| # no COMET, just /q/ routes and queue logic | |
| # the core of RestMQ is how it uses Redis' data types | |
| require 'rubygems' | |
| require 'sinatra' | |
| require 'redis' | |
| require 'json' | |
| QUEUESET = 'QUEUESET' # queue index |
| #!/bin/bash | |
| # author Gleicon Moraes | |
| # q&d for provisioning VirtualBox images for a Hadoop project | |
| # works on Mac Os X Snow Leopard. | |
| # fill in for the ubuntu iso path (must be absolute or put it on VBox HDD dir) | |
| # | |
| if [ "$#" -lt 1 ]; then | |
| echo "use as createvm <VMName>" | |
| exit |
| require "resque" | |
| require "resque/failure/multiple" | |
| require "resque/failure/redis" | |
| # Configure Resque connection from config/redis.yml. This file should look | |
| # something like: | |
| # development: localhost:6379 | |
| # test: localhost:6379:15 | |
| # production: localhost:6379 | |
| Resque.redis = YAML.load_file(Rails.root + 'config/redis.yml')[Rails.env] |