Skip to content

Instantly share code, notes, and snippets.

View rymai's full-sized avatar
🙌
Working from home

Rémy Coutable rymai

🙌
Working from home
View GitHub Profile
@rymai
rymai / Gemfile.lock
Created October 5, 2018 11:43
Gemfile.lock
GIT
remote: https://github.com/jtapia/solidus_mailchimp_sync.git
revision: ee766bac790d38f18b56ac33bfad73b818a0c8f9
specs:
solidus_mailchimp_sync (1.0.0.beta06)
deface (~> 1.0)
http (~> 2.0)
solidus_core (>= 1.4, < 3)
solidus_support

Keybase proof

I hereby claim:

  • I am rymai on github.
  • I am rymai (https://keybase.io/rymai) on keybase.
  • I have a public key whose fingerprint is 2056 CEB5 6891 EFA6 5BE0 DF59 46DF 07E5 CD9E 96AB

To claim this, I am signing this object:

@rymai
rymai / gist:6620991
Last active December 23, 2015 10:19 — forked from lucascaton/gist:3605012
RSpec's New Expectation Syntax - migration script
# Include this in your spec_helper.rb:
config.expect_with :rspec do |c|
c.syntax = :expect
end
# Then, run:
find spec -name "*.rb" -exec gsed -i -e "s/\(\s\+\)\(.*\)\.should_not /\1expect(\2).not_to /g" -e "s/\(\s\+\)\(.*\)\.should /\1expect(\2).to /g" -e "s/\(\s\+\)\(.*\)\.should_receive/\1expect(\2).to receive/g" -e "s/\(\s\+\)\(.*\)\.should_not_receive/\1expect(\2).to_not receive/g" "{}" \;
# About RSpec's New Expectation Syntax
@rymai
rymai / application.js
Created January 18, 2013 09:59
This is the script I use on http://everyday.rymai.me that allows you to move from one image to another while in lightbox mode. It requires jQuery (http://jquery.com) and Mousetrap (http://craig.is/killing/mice). Demo: http://everyday.rymai.me Notes: The *.js.coffee files should be pre-compiled by Sprockets (https://github.com/sstephenson/sprockets
// This code is the automatic conversion to JS of photos_carousel.js.coffee + application.js.coffee.
// Performed on http://coffeescript.org (click on the "TRY COFFEESCRIPT" tab).
var PhotosCarousel;
PhotosCarousel = (function() {
function PhotosCarousel(lightboxes) {
this.lightboxes = lightboxes;
this.currentIndex = 0;
this.setupObservers();
@rymai
rymai / Guardfile
Created June 5, 2012 21:48
Trying to detect a Guard/Listen issue with folder that contains a '$' ( https://github.com/guard/guard/issues/287 )
guard 'shell' do
watch(/.+/) { |m| puts m }
end
@rymai
rymai / magnifying_glass.css
Created May 30, 2012 10:35
SublimeVideo lightbox with magnifying glass using the WordPress plugin
a.zoomable {
display:block;
width:180px;
height:76px;
background:#000;
position:relative;
-webkit-box-shadow:rgba(0,0,0,0.4) 0 4px 10px;
-moz-box-shadow:rgba(0,0,0,0.4) 0 4px 10px;
box-shadow:rgba(0,0,0,0.4) 0 4px 10px;
}
@rymai
rymai / Guardfile
Created October 11, 2011 22:16
Guard::Vagrant + Guard::PhpUnit
guard :vagrant, :cwd => '/custom/cwd'
guard :phpunit, :vagrant => true do
watch %r{^website/application/(.+)\.php}
watch %r{^website/tests/unit/(.+)\.php}
watch 'website/tests/unit/phpunit.xml'
end
@rymai
rymai / gist:1142414
Created August 12, 2011 16:31
Can't call the lower SQL function
# https://github.com/ernie/squeel/issues/42
NoMethodError: undefined method `with_connection' for ActiveRecord::Base:Class
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/rails-d9d78d4165d1/activerecord/lib/active_record/base.rb:1082:in `method_missing'
from /Users/remy/my_project/vendor/ruby/1.9.1/gems/arel-2.2.0/lib/arel/visitors/to_sql.rb:16:in `accept'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/squeel-788d71821d5b/lib/squeel/visitors/base.rb:85:in `quote'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/squeel-788d71821d5b/lib/squeel/visitors/predicate_visitor.rb:342:in `quote_for_node'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/squeel-788d71821d5b/lib/squeel/visitors/predicate_visitor.rb:101:in `visit_Squeel_Nodes_Predicate'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/squeel-788d71821d5b/lib/squeel/visitors/base.rb:97:in `visit'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/squeel-788d71821d5b/lib/squeel/visitors/pre
@rymai
rymai / gist:1114054
Created July 29, 2011 15:36
Watch any folder, from anywhere (new Guard CLI options, in the next release)!

In ~/prison, you put the Guardfile that describe which files to watch for changes and what to execute once a file is modified.

guard 'shell' do
  watch(%r{^.+\.txt$}) { |m| `echo #{File.join(::Guard.listener.directory, m[0])}` }
end

In ~/watch_from_here, you put the Gemfile that list the guards you want to use.