Skip to content

Instantly share code, notes, and snippets.

View davidjrice's full-sized avatar

David Rice davidjrice

View GitHub Profile
@davidjrice
davidjrice / instrumentation.rb
Created June 27, 2018 12:47 — forked from garrensmith/instrumentation.rb
CouchRest Instrumentation for Rails 3
# 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
/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 October 30, 2015 12:59 — forked from gwik/gist:6298001
Database setup and seeds for Rails, RSpec, Capybara, DatabaseCleaner and friends
# 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 April 30, 2014 22:16
List of punctuation characters
var PUNCTUATION = "" +
"’'" + // apostrophe
"()[]{}<>" + // brackets
":" + // colon
"," + // comma
"‒–—―" + // dashes
"…" + // ellipsis
"!" + // exclamation mark
"." + // full stop/period
"«»" + // guillemets
@davidjrice
davidjrice / .travis.yml
Last active October 23, 2019 16:17 — forked from johanneswuerbach/.travis.yml
Travis CI + TestFlight integration (updated for Travis' new Mac VM setup / xctool)
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
record.on "didLoad", $.proxy(->
console.log "loaded"
@doSomething()
), @
# Object #<Demo2> has no method 'apply'
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
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
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