Skip to content

Instantly share code, notes, and snippets.

Richard Venneman richardvenneman

Block or report user

Report or block richardvenneman

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
richardvenneman /
Last active Jun 24, 2019
Pull Heroku Postgres DB excluding specific table data
# Using the `--exlude-table-data` argument for the `heroku pg:pull` command doesn't seem to be working.
# Instead we're going to copy the Heroku PG database by using the Postgres `pg_dump` and `pg_restore` commands.
# Get the "Connection info string" for myapp
heroku pg:credentials:url DATABASE_URL -a myapp
# Download the database, excluding the `visits` and `ahoy_events` table data.
pg_dump "<PASTE_CONNECTION_INFO_STRING_HERE>" --exclude-table-data visits --exclude-table-data ahoy_events -O -x -Fc -f without_vists_and_ahoy_events.out -v
# In myapp, setup an empty database
View gist:a454922c9874bcf46a3c40a880716b1d
{"status":500,"error":"Internal Server Error","exception":"#\u003cActionView::Template::Error: undefined method `new_admin_booking_path' for #\u003c#\u003cClass:0x007fcf77e72e50\u003e:0x007fcf77e6a3e0\u003e\u003e","traces":{"Application Trace":[{"id":80,"trace":"appsignal (1.1.5) lib/appsignal/rack/rails_instrumentation.rb:15:in `call'"}],"Framework Trace":[{"id":0,"trace":"actionpack (5.0.0.beta3) lib/action_dispatch/routing/polymorphic_routes.rb:216:in `polymorphic_method'"},{"id":1,"trace":"actionpack (5.0.0.beta3) lib/action_dispatch/routing/polymorphic_routes.rb:130:in `polymorphic_path'"},{"id":2,"trace":"actionview (5.0.0.beta3) lib/action_view/routing_url_for.rb:102:in `url_for'"},{"id":3,"trace":"actionview (5.0.0.beta3) lib/action_view/helpers/url_helper.rb:196:in `link_to'"},{"id":4,"trace":"/Users/richard/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/administrate-71a53e4e347f/app/views/administrate/application/index.html.erb:50:in `___sers_richard__rbenv_versions_______lib_ruby_gems____
View _floatl.scss
.floatl--focused .floatl__label {
color: hsl(201, 73%, 54%);
.floatl--active {
.floatl__input {
padding: 1.4em 1em .6em 1em;
richardvenneman / rp.zshrc
Created Apr 18, 2014
ZSH Rails startup, depends on the osx oh-my-zsh plugin, usage: `rp myproject`
View rp.zshrc
function rp() {
cd ~/Projects/$1
tab bin/rails s --bind
tab bundle exec guard
mate .
git status
richardvenneman / _bg-variants.scss
Created Nov 12, 2013
This bg-variants mixin is a responsive images solution which supports multiple screen widths and densities. It uses CSS3 multiple backgrounds and is an improvement in user experience over just specifying backgrounds since any low res background image specified later in the stack will load first. This solution doesn't play well with IE8 as it wil…
View _bg-variants.scss
// Background Variants
@mixin bg-variants($filename, $path: '/online/', $extension: 'jpg') {
background-image: url(#{$path + $filename + '.small.' + $extension});
@include hidpi(1.5) {
url(#{$path + $filename + '.small@2x.' + $extension}),
url(#{$path + $filename + '.small.' + $extension});
richardvenneman /
Created Oct 25, 2013
A simple CoffeeScript parallax responsive image implementation
class Parallax
options =
velocity: 15
constructor: ->
@imgs = ($ '.parralax img')
@offset = 0
richardvenneman / json_to_nano_object.rb
Created Oct 24, 2012
I use this method to retrieve some JSON and prepare the objects for NanoStore.
View json_to_nano_object.rb
def self.update(username, &block)
BW::HTTP.get("#{Constants::API_endpoint}/events/#{username}") do |response|
if response.ok?
events = BW::JSON.parse(response.body)
events.each { |e|
eventdata = e.each_with_object({}){ |(k,v), h| h[k.to_sym] = v }
eventData.each { |k,v| eventData.delete(k) if v.nil? }
View _html5boilerplate.css.sass
* HTML5 ✰ Boilerplate
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
* Detailed information about this CSS:
* ==|== normalize ==========================================================
richardvenneman /
Created Aug 15, 2011
Basic Jasmine CoffeeScript test
window.Password = class Password
constructor: (passphrase) ->
@strength = @calcStrength passphrase.length
calcStrength: (len) ->
if len / 3 > 10 # everything with a length-1 > 30 gets a strength of 10
richardvenneman / Default New Doc Sizes.txt
Created Aug 14, 2011
iOS and Android Photoshop presets.
View Default New Doc Sizes.txt
; Mobile screen sizes
"iPhone" 320 480 pixels 163 dpi RGB 8 1.0 white "none"
"iPhone - Retina" 480 960 pixels 326 dpi RGB 8 1.0 white "none"
"iPad (portrait)" 768 1024 pixels 132 dpi RGB 8 1.0 white "none"
"iPad (landscape)" 1024 768 pixels 132 dpi RGB 8 1.0 white "none"
You can’t perform that action at this time.