I hereby claim:
- I am mchail on github.
- I am mchail (https://keybase.io/mchail) on keybase.
- I have a public key whose fingerprint is 0217 CCDB A934 DCD5 7444 F922 21F5 B443 568B 6E57
To claim this, I am signing this object:
# getting context – what can this thing do? | |
show-source | |
$ Sidekiq | |
$ Sidekiq.queues= | |
ls Sidekiq | |
cd Sidekiq | |
whereami | |
ls |
{ | |
"locations": ["My bag"], | |
"discs": [ | |
{ | |
"mold": "Reko", | |
"manufacturer": "Kastaplast", | |
"plastic": "K3", | |
"numbers": "3 3 0 1", | |
"color": "white", | |
"notes": null, |
require 'json' | |
Disc = Struct.new( | |
:plastic, | |
:weight, | |
:color, | |
:quantity, | |
) | |
WIDTH = 16 | |
REKO_MODEL_ID = '16569' |
# https://twitter.com/xor/status/978793975590150144 | |
require 'open-uri' | |
require 'csv' | |
class PrefixTreeSearch | |
attr_reader :codes, :words, :root | |
attr_accessor :found | |
MAX_LENGTH = 12 |
require 'json' | |
require 'httparty' | |
class FindJordansPR | |
def auth | |
{ | |
username: :mchail, | |
password: ENV['pw'] | |
} |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
# | |
# Usage: ruby [filename] [word] | |
# Will return a list of up to ten words from the system dictionary | |
# that could be played before the provided word. It is up to the user | |
# to manually filter for "root" constraints. | |
# e.g. | |
# ruby pirates.rb marquisotte | |
class Yarr |
class Dealer | |
def initialize | |
@deck = new_deck | |
end | |
def deal(size) | |
if @deck.size < size | |
@deck = new_deck | |
end | |
@deck.pop(size) |
class IntervalMerger | |
def initialize(*intervals) | |
@intervals = intervals | |
end | |
def merge | |
# TODO: return the reduced set of intervals | |
end | |
end |
a = Ad.find "53c354433486db904c000010" | |
s = a.site | |
ads = [] | |
s.ads.each{|a| begin; open a.image.url; rescue; ads << a; end} | |
def move(a) | |
source_key = Paperclip::Interpolations.interpolate "ads/:attachment/:id_partition/:style/:filename", a.image, :original | |
target_key = Paperclip::Interpolations.interpolate "images/:hash/:style.:extension", a.image, :original | |
m = MigrateAds.new | |
moved = m.instance_variable_get(:@s3).buckets[m.instance_variable_get(:@bucket_name)].objects[source_key].copy_to(target_key, :acl => :public_read) | |
end |