Skip to content

Instantly share code, notes, and snippets.

David Rice davidjrice

Block or report user

Report or block davidjrice

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@davidjrice
davidjrice / instrumentation.rb
Created Jun 27, 2018 — forked from garrensmith/instrumentation.rb
CouchRest Instrumentation for Rails 3
View instrumentation.rb
# add to config/initializers/instrumentation.rb
module CouchRest
class Database
alias_method :old_get, :get
alias_method :old_view, :view
alias_method :old_update_doc, :update_doc
alias_method :old_delete_doc, :delete_doc
View osx.sh
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install wget
wget https://dl-web.dropbox.com/installer\?build_no\=5.4.24\&plat\=mac -o DropboxInstaller.dmg
open DropboxInstaller.dmg
@davidjrice
davidjrice / gist:3d923a6920d80dad7b22
Created Oct 30, 2015 — forked from gwik/gist:6298001
Database setup and seeds for Rails, RSpec, Capybara, DatabaseCleaner and friends
View gist:3d923a6920d80dad7b22
# Database setup and seeds loading
# See the block post : http://sigkill.tumblr.com/post/58933579738/test-database-setup-and-seeds-with-rails-rspec
module Seeder
@@__cache__ = {}
def self.load_seed(filename, prefix='app')
filename = Rails.root + "db/seeds/#{prefix}/#{filename}.seeds.rb"
seed_mod = @@__cache__[filename] ||= begin
mod = Module.new
@davidjrice
davidjrice / punctuation.js
Created Apr 30, 2014
List of punctuation characters
View punctuation.js
var PUNCTUATION = "" +
"’'" + // apostrophe
"()[]{}<>" + // brackets
":" + // colon
"," + // comma
"‒–—―" + // dashes
"…" + // ellipsis
"!" + // exclamation mark
"." + // full stop/period
"«»" + // guillemets
@davidjrice
davidjrice / .travis.yml
Last active Oct 23, 2019 — forked from johanneswuerbach/.travis.yml
Travis CI + TestFlight integration (updated for Travis' new Mac VM setup / xctool)
View .travis.yml
language: objective-c
xcode_workspace: "<WorkspaceName.xcworkspace>"
xcode_scheme: "<SchemaName>"
script: xctool -workspace <WorkspaceName.xcworkspace> -scheme <SchemeName> -configuration Release build archive
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
View ember-load-issue.coffee
record.on "didLoad", $.proxy(->
console.log "loaded"
@doSomething()
), @
# Object #<Demo2> has no method 'apply'
View cairo-ft.pc
prefix=/app/vendor/cairo-1.12.8
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: cairo-ft
Description: FreeType font backend for cairo graphics library
Version: 1.12.8
Requires: cairo freetype2 >= 9.7.3
View pixman-1.pc
prefix=/app/vendor/pixman-0.28.0
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: Pixman
Description: The pixman library (version 1)
Version: 0.28.0
Cflags: -I${includedir}
Libs: -L${libdir} -lpixman-1
View cairo.pc
prefix=/app/vendor/cairo-1.12.8
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: cairo
Description: Multi-platform 2D graphics library
Version: 1.12.8
Requires.private: gobject-2.0 glib-2.0 pixman-1 >= 0.22.0 freetype2 >= 9.7.3 libpng x11 xext
You can’t perform that action at this time.