Skip to content

Instantly share code, notes, and snippets.

Josh Chernoff joshchernoff

Block or report user

Report or block joshchernoff

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
yctay / figaro-capistrano.rb
Created Apr 30, 2013
Capistrano recipe for deploying figaro's application.yml
View figaro-capistrano.rb
namespace :figaro do
desc "SCP transfer figaro configuration to the shared folder"
task :setup do
transfer :up, "config/application.yml", "#{shared_path}/application.yml", :via => :scp
desc "Symlink application.yml to the release path"
task :finalize do
run "ln -sf #{shared_path}/application.yml #{release_path}/config/application.yml"
linjunpop /
Last active Dec 10, 2015
Change default date format in Rails

  :default => '%m/%d/%Y'
  :default => '%m/%d/%Y %I:%M %p',
  :date_time12 => "%m/%d/%Y %I:%M %p",
  :date_time24 => "%m/%d/%Y %H:%M"
linjunpop /
Created Aug 21, 2012
Rails flash messages with AJAX requests
jjhageman / item_image.rb
Created Jun 3, 2011
Extracting Geolocation Image Data with Carrierwave and RMagick on Heroku
View item_image.rb
class ItemImage < ActiveRecord::Base
belongs_to :item
mount_uploader :image, ImageUploader
before_save :extract_geolocation
def extract_geolocation
img =[0] rescue nil
You can’t perform that action at this time.