I hereby claim:
- I am ssaunier on github.
- I am ssaunier (https://keybase.io/ssaunier) on keybase.
- I have a public key ASCsw5K7-RA-3BDEFl9tlnCPXVIbO_Z8-lOaSAxT6u-pBgo
To claim this, I am signing this object:
| source 'https://rubygems.org' | |
| ruby "2.0.0" | |
| gem "rspec" | |
| gem "rspec-mocks" | |
| gem "rspec-fire" |
| # Copyright: Applidget - 2013 | |
| # License: MIT | |
| # Author: Sébastien Saunier (@ssaunier) | |
| require "mandrill" | |
| class MandrillApiMailer | |
| def initialize(key = nil) | |
| key ||= ENV['MANDRILL_PASSWORD'] |
| #!/usr/bin/env ruby | |
| # Usage: MOBICHECKIN_API_TOKEN=#### MOBICHECKIN_EVENT_ID=##### ./rooms.rb | |
| require "rubygems" | |
| require "httparty" | |
| class MobiCheckin | |
| include HTTParty | |
| # base_uri "localhost:5000/api/v1" | |
| base_uri "https://app.mobicheckin.com/api/v1" |
| #!/usr/bin/env ruby | |
| # | |
| # To simply run this script from your terminal: | |
| # $ ruby -e "$(curl -fsSL https://gist.github.com/ssaunier/7612827/raw/heroku-CVE-2013-4164.rb)" | |
| # | |
| # From Heroku email, you must upgrade your ruby version to: | |
| # | |
| # New: ruby 1.8.7p375 (2013-11-22 revision 375) [x86_64-linux] | |
| # New: ruby 1.9.2p321 (2013-11-22 revision 321) [x86_64-linux] | |
| # New: ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux] |
| <?php | |
| // To be included in iframe 1100x550 | |
| // Config from https://www.colissimo.fr/pudo-bo/configuration.htm | |
| $front_office_identifier = 'YOUR_ID'; | |
| $crypt_key = 'YOUR_KEY'; | |
| // Form input fields. Order is important (for signature), do not change | |
| $inputs = [ |
| class IntegerFormatter | |
| def with_commas(integer) | |
| quotient = integer / 1000 | |
| remainder = integer % 1000 | |
| if quotient == 0 | |
| remainder.to_s | |
| else | |
| prepend = with_commas(quotient) | |
| "#{prepend},#{"%03d" % remainder}" |
| cd /path/to/your/repo | |
| curl https://gist.github.com/ssaunier/8704755/raw/pre-push.sh > .git/hooks/pre-push | |
| chmod u+x .git/hooks/pre-push |
| require "uri" | |
| require "cgi" | |
| class ApplicationHelper | |
| def embedded_video(url, options = {}) | |
| if url | |
| # TODO: Handle other sources than Youtube video | |
| params = CGI::parse(URI.parse(url).query || "") | |
| if params["v"] | |
| embedded_url = "//www.youtube.com/embed/#{params["v"].first}" |
| # app/services/minitest_rake_runner.rb | |
| require 'open3' | |
| class MinitestRakeRunner | |
| attr_reader :stdout_lines | |
| class RakefileMissingError < StandardError; end | |
| PATTERN = /(?<tests>\d+) (tests|runs), (?<assertions>\d+) assertions, (?<failures>\d+) failures, (?<errors>\d+) errors, (?<skips>\d+) skips/ |
I hereby claim:
To claim this, I am signing this object: