Skip to content

Instantly share code, notes, and snippets.

@jbilbo
jbilbo / export_photos.rb
Last active August 29, 2015 14:10
Little script to export photos from s3 with specific thumbnail, based on a json
#!/usr/bin/env ruby
require 'json'
base_url = 'project.s3.amazonaws.com'
# Example JSON
#{
#"data":
# [
@jbilbo
jbilbo / rename_photos.rb
Created December 3, 2014 22:45
little script to rename photos for an internal need.
#!/usr/bin/env ruby
array_photos =
[ 'ne001.png.1', 'ne001.png.2', 'ne001.png.3', 'ne001.png.4', 'ne002.png.1', 'ne002.png.2', 'ne002.png.3', 'ne002.png.4', 'ne003.png.1', 'ne003.png.2', 'ne003.png.3', 'ne003.png.4', 'ne004.png.1', 'ne004.png.2', 'ne004.png.3', 'ne004.png.4', 'ne005.png.1', 'ne005.png.2', 'ne005.png.3', 'ne005.png.4', 'ne006.png.1', 'ne006.png.2', 'ne006.png.3', 'ne006.png.4', 'ne007.png.1', 'ne007.png.2', 'ne007.png.3', 'ne007.png.4', 'ne008.png.1', 'ne008.png.2', 'ne008.png.3', 'ne008.png.4', 'ne009.png.1', 'ne009.png.2', 'ne009.png.3', 'ne009.png.4', 'ne010.png.1', 'ne010.png.2', 'ne010.png.3', 'ne010.png.4', 'ne011.png.1', 'ne011.png.2', 'ne011.png.3', 'ne011.png.4', 'ne012.png.1', 'ne012.png.2', 'ne012.png.3', 'ne012.png.4', 'ne013.png.1', 'ne013.png.2', 'ne013.png.3', 'ne013.png.4', 'ne014.png.1', 'ne014.png.2', 'ne014.png.3', 'ne014.png.4', 'ne015.png.1', 'ne015.png.2', 'ne015.png.3', 'ne015.png.4', 'ne016.png.1', 'ne016.png.2', 'ne016.png.3', 'ne016.png.4', 'ne017.png.1', 'ne017.png.
source 'https://rubygems.org'
gem 'rails', '4.1.6'
gem 'mysql2'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
/Users/jbilbo/.rvm/gems/ruby-2.1.4@foobarapp/extensions/x86_64-darwin-13/2.1.0/bcrypt-3.1.7/bcrypt_ext.bundle: [BUG] Segmentation fault at 0x00000000000438
ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-darwin13.0]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/CrashReporter
* /Library/Logs/CrashReporter
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
for more details.
$ rails s
/Users/jbilbo/.rvm/gems/ruby-2.1.4@foobarapp/extensions/x86_64-darwin-13/2.1.0/did_you_mean-0.7.0/did_you_mean/method_missing.bundle: [BUG] Segmentation fault at 0x00000000000438
ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-darwin13.0]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/CrashReporter
* /Library/Logs/CrashReporter
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports