I hereby claim:
- I am ismasan on github.
- I am ismasan (https://keybase.io/ismasan) on keybase.
- I have a public key whose fingerprint is 3E67 5E59 B46D D332 2669 6883 2AA1 2B6D 5825 B214
To claim this, I am signing this object:
| #!/bin/sh | |
| usage () | |
| { | |
| cat <<EOF | |
| docker-enter -- Enter a running container via boot2docker and nsenter | |
| Usage: docker-enter <container_name_or_ID> [command] | |
| See https://github.com/jpetazzo/nsenter for details. |
| # blog post: http://blog.slashpoundbang.com/post/1455548868/memcachemodel-make-any-ruby-object-that-persists-in | |
| # No transactions or exceptions (yet). | |
| module MemcacheModel | |
| def self.included(base) | |
| base.class_eval do | |
| extend ActiveModel::Naming | |
| extend ActiveModel::Translation | |
| extend ActiveModel::Callbacks | |
| extend MemcacheModel::ClassMethods |
| #!/usr/bin/env ruby | |
| cmd = %q[echo '3...'; sleep 1; | |
| echo '2...'; sleep 1; | |
| echo '1...'; sleep 1; | |
| echo 'Liftoff!'] | |
| puts '------ beginning command ------' | |
| output_log = [] | |
| IO.popen(cmd).each do |line| |
| #!/usr/bin/env ruby | |
| # A quick and dirty implementation of an HTTP proxy server in Ruby | |
| # because I did not want to install anything. | |
| # | |
| # Copyright (C) 2009-2014 Torsten Becker <[email protected]> | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining | |
| # a copy of this software and associated documentation files (the | |
| # "Software"), to deal in the Software without restriction, including | |
| # without limitation the rights to use, copy, modify, merge, publish, |
| web: bundle exec puma -p $PORT config.ru |
I hereby claim:
To claim this, I am signing this object:
| gem 'dragonfly', '~>0.9.4' | |
| group :production do | |
| gem 'fog' # for Amazon S3 | |
| end |
| # Natively, Enumerators get JSONized like "#<Enumerator::Lazy:0x007f8714807080>", or they explode, either of which is a problem. | |
| # We want them to make an array, and do it lazily so we don't have to keep the items in memory! | |
| class Enumerator | |
| def to_json(state) | |
| state.depth += 1 | |
| string = "[\n" | |
| first_item = true | |
| self.each do |item| |
| class ActiveSupport::IntegrationCase < ActiveSupport::TestCase | |
| include Capybara | |
| include Rails.application.routes.url_helpers | |
| self.use_transactional_fixtures = false | |
| # Checks for missing translations after each test | |
| teardown do | |
| unless source.blank? |
| /** | |
| * Simple event dispatcher | |
| * | |
| * Example | |
| * | |
| * var MyConstructor = function () { | |
| * var self = this | |
| * var count = 0 | |
| * setInterval(function () { | |
| * self.emit('tick', {count: count}) |