I hereby claim:
- I am jsonperl on github.
- I am jsonperl (https://keybase.io/jsonperl) on keybase.
- I have a public key whose fingerprint is 4EB2 EE10 1A03 2977 0669 6325 ADD4 5A30 88DB F45D
To claim this, I am signing this object:
require "bundler/inline" | |
gemfile do | |
source "https://rubygems.org" | |
gem "activerecord" | |
gem "sqlite3" | |
gem "searchkick", git: "https://github.com/ankane/searchkick.git" | |
end |
I hereby claim:
To claim this, I am signing this object:
source "https://rubygems.org" | |
ruby "1.9.3", engine: "jruby", engine_version: "1.7.23" | |
gem "celluloid-io" |
class CheapDB | |
def initialize(filename) | |
@file = "#{filename}.yml" | |
FileUtils.touch @file | |
@data = YAML.load_file(@file) || {} | |
end | |
def get_or_set(key, &block) | |
get(key) || set(key, block.call) |
# Use fog to delete all matching files from a bucket, specifically targeting versioned buckets. | |
# | |
# Note: you'll want to 'suspend' versioning since deletes would create a ton of | |
# DeleteMarkers, which you would then have to delete, recursively, | |
# until the end of time. | |
# | |
# Allows for a dry run to see what you're gonna kill before you kill it | |
class S3FileDeleter | |
DELETE_BATCH_SIZE = 900 |
require 'aws/s3' | |
include AWS::S3 | |
class S3Utils | |
include AWS::S3 | |
def self.connect! | |
config = YAML.load(File.open("#{RAILS_ROOT}/config/amazon_s3.yml"))[RAILS_ENV] |
source 'http://rubygems.org' | |
gem 'eventmachine', ">= 1.0.0.beta" |
{spawn, exec} = require 'child_process' | |
option '-p', '--prefix [DIR]', 'set the installation prefix for `cake install`' | |
async = require "async" | |
fs = require "fs" | |
path = require "fs" | |
_ = require "underscore" | |
stdout_handler = (data)-> |
require 'aws/s3' | |
include AWS::S3 | |
class S3Utils | |
include AWS::S3 | |
def self.connect! | |
config = YAML.load(File.open("#{RAILS_ROOT}/config/amazon_s3.yml"))[RAILS_ENV] |