I hereby claim:
- I am davidcelis on github.
- I am davidcelis (https://keybase.io/davidcelis) on keybase.
- I have a public key whose fingerprint is 7932 F3A5 43C4 7961 B2FF E77A 4A35 06D4 2B00 16D7
To claim this, I am signing this object:
require 'docker' | |
container = Docker::Container.create( | |
'Image' => 'ubuntu:14.04', | |
'Cmd' => [ | |
'/bin/bash', | |
'-c', | |
'for i in {1..10}; do echo $i; sleep 1; done' | |
] | |
) |
class HelloWorld { | |
public static void main(String[] args) { | |
System.out.println("Hello from Java"); | |
} | |
} |
puts "Hello, world." |
upstream puma { | |
server unix:///var/www/app/shared/tmp/sockets/puma.sock fail_timeout=0; | |
} | |
server { | |
listen 80 default deferred; | |
server_name example.com; | |
rewrite ^/(.+) https://example.com/$1 permanent; | |
} |
I hereby claim:
To claim this, I am signing this object:
require 'active_support/core_ext/time' | |
class BusinessHoursFeature | |
# This feature is only available between the hours of 10am and 4pm | |
def enabled? | |
Time.use_zone('Pacific Time (US & Canada)') do | |
now = Time.zone.now | |
am, pm = Time.zone.parse('10:00'), Time.zone.parse('16:00') | |
weekday = !(now.saturday? || now.sunday?) |
#!/usr/bin/env bash | |
brew install docker boot2docker | |
boot2docker init | |
boot2docker up | |
export DOCKER_HOST="tcp://localhost:4243" |
module Sluggable | |
extend ActiveSupport::Concern | |
included do | |
before_create :set_slug | |
validates :slug, uniqueness: { case_sensitive: false } | |
scope :from_param, -> param { find_by(slug: param) } | |
end |
class Worker | |
class << self | |
attr_accessor :instances | |
def update_instances | |
instances.each do |instance| | |
# Update accordingly | |
end | |
end | |
end |