Skip to content

Instantly share code, notes, and snippets.

@jrmehle
jrmehle / Railsconf MPLS Bike Ride
Last active April 27, 2019 19:36
Details of a possible planned bike ride for those attending RailsConf 2019 in Minneapolis
Tweet: Any @railsconf attendees interested in a bike ride sometime next week? I'd love to show some folks around the trails along the river. We can keep the pace light. Willing to help figure out equipment rentals for out of town folks.
https://twitter.com/jrmehle/status/1121453494618198017
Date/Time: TBD, leaning towards Tuesday evening after day closing keynote (6:30ish?)
Distance: 10-15 miles
Routes:
Hyatt Regency to Minnehaha Falls (possible stop at Stone Arch) - 15 miles: https://goo.gl/maps/whujrFfT2AwBePWp9
Hyatt Regency to Lake Harriet (tour chain of lakes) - 10 miles: https://goo.gl/maps/fLzLHtXSPob2jftp9
source 'https://rubygems.org'
gem 'rails', '4.2.3'
gem 'pg', '0.18.1'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails', '~> 4.0.3'

Keybase proof

I hereby claim:

  • I am jrmehle on github.
  • I am jrmehle (https://keybase.io/jrmehle) on keybase.
  • I have a public key ASDNms8zpJrit7vrAPMkc5aheCdGi0_nOgoL0-hih_IhPQo

To claim this, I am signing this object:

@jrmehle
jrmehle / db_backup.sh
Last active September 20, 2017 23:23 — forked from bendavis78/db_backup.sh
A simple database backup / rotation / prune script
#!/bin/bash
# for use with cron, eg:
# 0 3 * * * postgres /var/db/db_backup.sh foo_db
if [[ -z "$1" ]]; then
echo "Usage: $0 <db_name> [pg_dump args]"
exit 1
fi
$('select#user_school_id').select2
minimumInputLength: 3
placeholder: 'Search for Your School'
{
"color_scheme": "Packages/User/idleFingers.tmTheme",
"draw_white_space": "selection",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",
@jrmehle
jrmehle / gist:32458dc124db3407d5a8
Created October 29, 2014 21:05
Rubinius install fails in Yosemite
ruby-install --rubies-dir ~/.rvm/rubies rbx 2.2.10
>>> Installing rbx 2.2.10 into /Users/jared/.rvm/rubies/rbx-2.2.10 ...
>>> Installing dependencies for rbx 2.2.10 ...
Warning: openssl-1.0.1j already installed
Warning: readline-6.3.8 already installed
Warning: libyaml-0.1.6 already installed
Warning: gdbm-1.11 already installed
>>> Downloading http://releases.rubini.us/rubinius-2.2.10.tar.bz2 into /Users/jared/src ...
>>> Verifying rubinius-2.2.10.tar.bz2 ...
>>> Extracting rubinius-2.2.10.tar.bz2 to /Users/jared/src/rubinius-2.2.10 ...
@jrmehle
jrmehle / bike_scraper.rb
Last active August 29, 2015 14:05
A script to quickly see if any bikes I'm interested in are in stock on my favorite site to buy bikes from.
require 'nokogiri'
require 'open-uri'
require 'colorize'
class BikeScraper
BIKES_DIRECT_URL = 'http://www.bikesdirect.com/products/cross_bikes.htm'
TARGET_BIKE_SIZE_REGEX = /56cm/
TARGET_BIKE_NAME = 'Fantom'
def execute
/Users/jared/.rvm/gems/ree-1.8.7-2010.02/bundler/gems/meta_search-15d49d18cde6/lib/meta_search/builder.rb:138:in `method_missing'
/Users/jared/.rvm/gems/ree-1.8.7-2010.02/bundler/gems/meta_search-15d49d18cde6/lib/meta_search/builder.rb:116:in `send'
/Users/jared/.rvm/gems/ree-1.8.7-2010.02/bundler/gems/meta_search-15d49d18cde6/lib/meta_search/builder.rb:116:in `assign_attributes'
/Users/jared/.rvm/gems/ree-1.8.7-2010.02/bundler/gems/meta_search-15d49d18cde6/lib/meta_search/builder.rb:115:in `each_pair'
/Users/jared/.rvm/gems/ree-1.8.7-2010.02/bundler/gems/meta_search-15d49d18cde6/lib/meta_search/builder.rb:115:in `assign_attributes'
/Users/jared/.rvm/gems/ree-1.8.7-2010.02/bundler/gems/meta_search-15d49d18cde6/lib/meta_search/builder.rb:90:in `build'
/Users/jared/.rvm/gems/ree-1.8.7-2010.02/bundler/gems/meta_search-15d49d18cde6/lib/meta_search/searches/active_record.rb:32:in `search'
app/controllers/north_star/properties_controller.rb:22:in `search'
actionpack (3.0.3) lib/action_controller/metal/implicit_rend
module Paperclip
module Dimension
def get_size_of(name, thumbnail=nil)
return '0x0' unless get_path_of(name, thumbnail)
Geometry.from_file(get_path_of(name, thumbnail)).to_s
end
# calculates width using processor
def get_width_of(name, thumbnail=nil)
return 0 unless get_path_of(name, thumbnail)