I hereby claim:
- I am sija on github.
- I am sija (https://keybase.io/sija) on keybase.
- I have a public key whose fingerprint is 7D5B 64C2 BA55 F96F D21B 8843 1551 5E26 9AB4 D86A
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| # make script exit if a simple command fails and | |
| # make script print commands being executed | |
| set -e -x | |
| # names of latest versions of each package | |
| export VERSION_PCRE=pcre-8.39 | |
| export VERSION_OPENSSL=openssl-1.0.2f | |
| export VERSION_NGINX=nginx-1.9.11 |
| module MacroMagic | |
| def initialize(**attributes) | |
| {% for var in @type.instance_vars %} | |
| if arg = attributes[:{{var.name.id}}]? | |
| @{{var.name.id}} = arg | |
| end | |
| {% end %} | |
| end | |
| private def instance_var_get(name) |
| def retry(limit, *, backoff = nil) | |
| attempts = 1 | |
| loop do | |
| return yield | |
| rescue error | |
| raise error if attempts == limit | |
| sleep(backoff * attempts) if backoff | |
| attempts += 1 | |
| end | |
| end |
| <IfModule mod_rewrite.c> | |
| RewriteEngine on | |
| # Preserve HTTP/HTTPS protocol in .htaccess redirects | |
| # http://stackoverflow.com/a/20419821/601064 | |
| RewriteCond %{HTTPS} =on | |
| RewriteRule ^(.*)$ - [env=proto:https] | |
| RewriteCond %{HTTPS} !=on | |
| RewriteRule ^(.*)$ - [env=proto:http] |
| class AssertionError < Exception | |
| end | |
| # If `cond` is `false`, raise `exc`. | |
| # If `exc` is not provided, `AssertionError` will be raised instead with information about the faulty expression. | |
| # If the expression is a comparison, the result of each side of the comparison will also be shown. | |
| macro assert(cond, exc = nil) | |
| unless {{ cond }} | |
| {% if exc %} | |
| raise {{ exc }} |
| module ActionMailer | |
| class MessageDelivery | |
| private | |
| def enqueue_delivery(delivery_method, options={}) | |
| args = @mailer.name, @mail_method.to_s, delivery_method.to_s, I18n.locale.to_s, *@args | |
| ActionMailer::DeliveryJob.set(options).perform_later(*args) | |
| end | |
| end | |
| class DeliveryJob | |
| def perform(mailer, mail_method, delivery_method, locale, *args) # :nodoc: |
I hereby claim:
To claim this, I am signing this object:
| class DimensionsValidator < ActiveModel::EachValidator | |
| def validate_each(record, attribute, value) | |
| temp_file = value.queued_for_write[:original] | |
| return unless temp_file.present? | |
| return unless geo = Paperclip::Geometry.from_file(temp_file) | |
| options.slice(:width, :height).each_pair do |key, expectation| | |
| next unless dimension = geo.send(key) | |
| case expectation |
| moduleKeywords = ['extended', 'included'] | |
| class Module | |
| @extend: (obj) -> | |
| for key, value of obj when key not in moduleKeywords | |
| @[key] = value | |
| obj.extended?.apply(@) | |
| this |
| require 'active_record/fixtures' | |
| namespace :db do | |
| desc 'Seed the database with once/ and always/ fixtures.' | |
| task :seed => :environment do | |
| load_fixtures 'seed/once' | |
| load_fixtures 'seed/always', :always | |
| end | |
| desc 'Seed the database with develop/ fixtures.' |