Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am arches on github.
  • I am arches (https://keybase.io/arches) on keybase.
  • I have a public key whose fingerprint is 1362 D442 CE1B 48CC B351 EB24 07EE E79C E2D8 8D2C

To claim this, I am signing this object:

@arches
arches / squirt
Last active October 13, 2016 15:22 — forked from foozmeat/squirt
squirt: upload a file to a slack channel from the cli
#!/usr/bin/env ruby
require 'json'
require 'shellwords'
if ARGV.length < 3 then
puts "Usage: squirt <filename> <channel> <comment>"
exit
end
@arches
arches / bundler.txt
Created July 15, 2015 16:03
what's wrong with my deps?
Bundler could not find compatible versions for gem "rest-client":
In snapshot (Gemfile.lock):
rest-client (= 1.8.0)
In Gemfile:
stripe (~> 1.17) ruby depends on
rest-client (~> 1.4) ruby
cloudinary (= 1.0.60) ruby depends on
rest-client (>= 0) ruby
@arches
arches / req.txt
Last active August 29, 2015 14:17
PrettyQuick - Mobile Developer (iOS)
PrettyQuick - Mobile Developer (iOS)
## What We're Doing
PrettyQuick is the easiest way to book beauty services. We allow our users to book beauty appointments directly from their browser or smartphone. We pride ourselves on providing trusted recommendations and an excellent customer experience. Headquartered in Chicago, we're currently live in six cities and adding new partner salons every day.
We're solving a challenging problem: seamlessly matching supply and demand in a highly fragmented $60 billion industry. We're laser-focused on a technology-centric strategy and we need your help to make it happen.
## Why We're Hiring
### Keybase proof
I hereby claim:
* I am arches on github.
* I am arches (https://keybase.io/arches) on keybase.
* I have a public key whose fingerprint is 1A0B 41C3 670F 854E 13BA FF5F 95AC 08C2 A2B9 C6CD
To claim this, I am signing this object:
@arches
arches / abstract.markdown
Last active August 29, 2015 13:57
The Rails Console - A Comprehensive Introduction

Working on a Rails app without using the console is like flying a 747 without instruments. You can see where you're going if it's nice out but hit some bad weather and you're lost in the dark. In this talk I'll teach you the battle-tested console commands and techniques I use on a daily basis. We'll be spiking features, databasing, patching production apps, automating grunt work - the sky's the limit. You will leave with a firm command of the console and its role in your workflow.

@arches
arches / gist:9256285
Created February 27, 2014 18:39
batch upload to s3
require 'rubygems'
require 'aws/s3'
local_file = ARGV[0]
guid = ARGV[1]
bucket = ARGV[2]
mime_type = ARGV[3]
AWS::S3::Base.establish_connection!(
:access_key_id => 'AKJAFLWEAJFLAKJ',
@arches
arches / instance_block.rb
Last active February 17, 2016 17:56
Syntactic sugar for simple filtering. A halfway point between posts.select(&:published) and posts.select{|post| post.comments.any?}
# before - each object in the enumerable is passed to the block
posts.select { |post| post.comments.any? }
class Array
def select(&blk)
if blk.arity == 0
super { |obj| obj.instance_exec &blk }
else
super
end
@arches
arches / bob.rb
Created December 9, 2013 16:32
bob
require 'forwardable'
class Bob
def hey(message)
message = Message.new(message)
case
when message.shouting?
"Woah, chill out!"
when message.question?
@arches
arches / cart.rb
Last active December 29, 2015 10:59
hash-backed shopping cart w session default
require 'active_support/hash_with_indifferent_access'
class Cart
include Enumerable
attr_writer :storage
def each(&blk)
deal_ids.each(&blk)
end