Skip to content

Instantly share code, notes, and snippets.

View Gulp log
[15:58:51] Warning: gulp version mismatch:
[15:58:51] Global gulp is 3.9.0
[15:58:51] Local gulp is 3.8.11
[15:58:58] Using gulpfile ~/projects/pepsico-warehouse/client/gulpfile.js
[15:58:58] Starting 'dev-server'...
[15:58:58] Finished 'dev-server' after 5.75 ms
[15:58:58] Starting 'scripts'...
[15:58:58] Starting 'templates'...
[15:58:58] Starting 'scss'...
[15:58:58] Starting 'copy-index'...
izoomi / migrate_to_s3.rb
Last active Dec 11, 2015
Migrate from file system to s3 (paperclip)
View migrate_to_s3.rb
# replace model with your model that has an attachment
# these definitions need to be defined on the model
definitions = Model.attachment_definitions
# root directory where you're storing your files
dir = '/home/railsapps/public_html/plenishable/shared'
Model.find_each do |record|
definitions.keys.each do |definition|
if record.send("#{definition}_file_name")
izoomi / Gemfile
Created Oct 22, 2012
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications -
View Gemfile
source :rubygems
# We are not loading Active Record, nor Active Resources etc.
# We can do this in any app by simply replacing the rails gem
# by the parts we want to use.
gem "actionpack", "~> 3.2"
gem "railties", "~> 3.2"
gem "tzinfo"
# Let's use thin