Skip to content

Instantly share code, notes, and snippets.

View davidjrice's full-sized avatar

David Rice davidjrice

View GitHub Profile
@davidjrice
davidjrice / gist:2713152
Created May 16, 2012 19:13
couchbase 1.2.0.dp issue with save_design_doc
[warn] event_base_loop: reentrant invocation. Only one event_base_loop can run on each event_base at once.
rake aborted!
exception class/object expected
/Users/dave/.rvm/gems/ruby-1.9.3-p0@rails-3-2/gems/couchbase-1.2.0.dp/lib/couchbase/bucket.rb:130:in `perform'
/Users/dave/.rvm/gems/ruby-1.9.3-p0@rails-3-2/gems/couchbase-1.2.0.dp/lib/couchbase/bucket.rb:130:in `save_design_doc'
@davidjrice
davidjrice / libcouchbase.rb
Created May 14, 2012 13:49
Homebrew recipe for libcouchbase 1.1.0.dp2
require 'formula'
class Libcouchbase < Formula
homepage 'http://couchbase.com/develop/c/next'
url 'http://packages.couchbase.com/clients/c/libcouchbase-1.1.0dp2.tar.gz'
md5 '7acef20e71390511edccd542d1a85dbc'
depends_on 'libevent'
depends_on 'libvbucket'
@davidjrice
davidjrice / hack.sh
Created April 4, 2012 11:10 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@davidjrice
davidjrice / heroku_env_clone.rake
Created March 10, 2012 19:43
Clone heroku environment variables to a .env file for foreman
desc "Clone heroku environment variables to a .env file for foreman'"
namespace :heroku do
namespace :env do
task :clone => :environment do
ignore_list = [
"DATABASE_URL",
"GEM_PATH",
"LANG",
"LOG_LEVEL",
"PATH",
@davidjrice
davidjrice / heroku_env_clone.rake
Created March 10, 2012 19:42
Clone heroku environment variables to a .env file for foreman
desc "Clone heroku environment variables to a .env file for foreman'"
namespace :heroku do
namespace :env do
task :clone => :environment do
ignore_list = [
"DATABASE_URL",
"GEM_PATH",
"LANG",
"LOG_LEVEL"
"PATH",
✗ rails console
Loading development environment (Rails 3.1.0.rc1)
ruby-1.8.7-p334 :001 > Task
NameError: uninitialized constant Task
from (irb):1
ruby-1.8.7-p334 :002 > exit
@davidjrice
davidjrice / input.rb
Created May 20, 2011 13:28
Automated indenting?
match '/solutions' => 'static#solutions', :as => :solutions
match '/solutions/sales-incentives' => 'static#sales_incentives', :as => :sales_incentives_solutions
match '/solutions/dealer-incentives' => 'static#dealer_incentives', :as => :dealer_incentives_solutions
==> Downloading http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz
File already downloaded and cached to /Users/dave/Library/Caches/Homebrew
==> ./bootstrap --prefix=/usr/local/homebrew/Cellar/cmake/2.8.4 --system-libs --no-system-libarchive --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man
==> make
Scanning dependencies of target cmsys_c
[ 0%] Building C object Source/kwsys/CMakeFiles/cmsys_c.dir/ProcessUNIX.o
Scanning dependencies of target cmsys
[ 0%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/ProcessUNIX.o
[ 0%] Building C object Source/kwsys/CMakeFiles/cmsys_c.dir/Base64.o
[ 0%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/Base64.o
@davidjrice
davidjrice / libtiff.rb
Created April 20, 2011 01:39
/usr/local/homebrew/Library/Formula/libtiff.rb
require 'formula'
class Libtiff < Formula
homepage 'http://www.remotesensing.org/libtiff/'
# remotesensing.org is offline.
# url 'ftp://ftp.remotesensing.org/pub/libtiff/tiff-3.9.5.zip'
# sha256 '332d1a658340c41791fce62fb8fff2a5ba04c2e82b8b85e741eb0a7b30e0d127'
---------------------------------------------
/usr/bin/c++ -O3 -march=core2 -msse4.1 -w -pipe -I/private/tmp/homebrew-cmake-2.8.4-eFdB/cmake-2.8.4/Bootstrap.cmk -I/private/tmp/homebrew-cmake-2.8.4-eFdB/cmake-2.8.4/Source -I/private/tmp/homebrew-cmake-2.8.4-eFdB/cmake-2.8.4/Bootstrap.cmk -c /private/tmp/homebrew-cmake-2.8.4-eFdB/cmake-2.8.4/Source/cmStandardIncludes.cxx -o cmStandardIncludes.o
/usr/bin/c++ -O3 -march=core2 -msse4.1 -w -pipe -I/private/tmp/homebrew-cmake-2.8.4-eFdB/cmake-2.8.4/Bootstrap.cmk -I/private/tmp/homebrew-cmake-2.8.4-eFdB/cmake-2.8.4/Source -I/private/tmp/homebrew-cmake-2.8.4-eFdB/cmake-2.8.4/Bootstrap.cmk -c /private/tmp/homebrew-cmake-2.8.4-eFdB/cmake-2.8.4/Source/cmake.cxx -o cmake.o
/usr/bin/c++ -O3 -march=core2 -msse4.1 -w -pipe -I/private/tmp/homebrew-cmake-2.8.4-eFdB/cmake-2.8.4/Bootstrap.cmk -I/private/tmp/homebrew-cmake-2.8.4-eFdB/cmake-2.8.4/Source -I/private/tmp/homebrew-cmake-2.8.4-eFdB/cmake-2.8.4/Bootstrap.cmk -c /private/tmp/homebrew-cmake-2.8.4-eFdB/cmake-2.8.4