Skip to content

Instantly share code, notes, and snippets.

Avatar
🔎
hunting for code to clean up

M. Scott Ford mscottford

🔎
hunting for code to clean up
View GitHub Profile
View gist:5015777
<% preview_width, preview_height = proof_file.large.get_version_dimensions %>
<% original_width, original_height = proof_file.original.get_version_dimensions %>
<%= javascript_tag %Q[
function activate_#{proof_file.object_id}() {
// set the 'master' and 'preview' images to be cropped
$('#cropbox').attr('src', '#{proof_file.large.url}');
$('#preview').attr('src', '#{proof_file.large.url}');
View sample_tenant.rb
# run this file with `rails runner sample_tenant.rb`
# You'll need to make sure that you've added `gem 'ffaker'` to your `Gemfile`.
require 'ffaker'
require 'open-uri'
require 'cgi'
PRICES = [
2.99, 4.99, 7.99, 8.99, 12.99, 15.99, 16.99, 17.99, 18.99,
19.99, 21.99, 22.99, 26.99, 28.99, 29.99, 30.99, 32.99, 35.99, 36.99,
You can’t perform that action at this time.