I hereby claim:
- I am rubiii on github.
- I am rubiii (https://keybase.io/rubiii) on keybase.
- I have a public key whose fingerprint is A16E 8BE9 0170 59BF FC7B 5041 33B6 0CF6 F240 DD49
To claim this, I am signing this object:
| class ApplicationController < ActionController::Base | |
| before_action :set_return_to | |
| def set_return_to | |
| if !request.xhr? && request.format.html? && request.get? | |
| session[:return_to] = request.url | |
| end | |
| end | |
| end |
| class DecimalValidator < ActiveModel::EachValidator | |
| def validate_each(record, attribute, value) | |
| precision = options[:precision] | |
| scale = options[:scale] | |
| if !precision || !scale | |
| raise ArgumentError, "#{self.class.name} expects :precision and :scale option" | |
| end |
| // Takes a screenshot from a given Tweet. | |
| // Usage: phantomjs twitter_screenshot.js https://twitter.com/Snowden/status/777557723118440448 | |
| var system = require("system"), | |
| args = system.args; | |
| var url = args[1]; | |
| if (!url) { | |
| console.log("Please provide the URL to a Tweet."); |
| ERB.new(<<MSG).result(binding) | |
| Blah | |
| ID CODE | |
| -------------------------------------------------------- | |
| <% @codes.each do |id, code| %> | |
| <%= id.ljust(20) %> <%= code %> | |
| <% end %> | |
| Blah | |
| MSG |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env ruby | |
| require 'httpclient' | |
| require 'json' | |
| if ARGV.any? | |
| gems = ARGV | |
| else | |
| puts 'feed me some gem name(s)!' | |
| exit |
| #!/usr/bin/env ruby | |
| require 'httpclient' | |
| require 'json' | |
| class Chk | |
| RUBYGEMS_URL = 'http://rubygems.org/gems/%s' | |
| NPM_URL = 'https://npmjs.org/package/%s' |