Skip to content

Instantly share code, notes, and snippets.

View bobbus's full-sized avatar

Adrien Coquio bobbus

  • Freelance
  • France
View GitHub Profile
@bobbus
bobbus / ar_hasmany_through_order_bug.rb
Last active August 29, 2015 14:01
AR bug when order on has_many :through
unless File.exists?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'sqlite3'
GEMFILE
system 'bundle'
end
@bobbus
bobbus / README.md
Last active April 13, 2017 16:47 — forked from scottatron/README.md
Dragonfly and ImageOptim setup

This runs provides an .optim job for dragonfly and also adds the .optim job into .thumb

This requires you have the 'image_optim' gem and it's dependencies.

@bobbus
bobbus / ar_circular_destroy_bug.rb
Last active January 2, 2016 08:59
AR bug with circular destroy
unless File.exists?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'sqlite3'
GEMFILE
system 'bundle'
end
unless File.exists?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'sqlite3'
GEMFILE
system 'bundle'
end
@bobbus
bobbus / ember-data.js
Created January 22, 2013 10:13
ember data 001ba0cbd8ef0bccf1ff15
(function() {
window.DS = Ember.Namespace.create({
// this one goes to 11
CURRENT_API_REVISION: 11
});
})();
// Version: v1.0.0-pre.2-311-g668783a
// Last commit: 668783a (2013-01-06 21:10:55 -0800)
(function() {
/*global __fail__*/
/**
Ember Debug
@bobbus
bobbus / .gemspec
Created June 16, 2012 00:08
Minimal gem
Gem::Specification.new do |gem|
gem.name = 'minimal_gem'
gem.version = '0.0.1'
gem.date = Date.today.to_s
gem.summary = "an awesome gem"
gem.description = "extended description"
gem.authors = ['Me']
gem.email = 'me@example.com'
begin
require 'aws/s3'
rescue LoadError => e
e.message << " (You may need to install the aws-s3 gem)"
raise e
end
class SitemapS3Publisher
def generate
sitemap.create