Skip to content

Instantly share code, notes, and snippets.

View cee-dub's full-sized avatar

Cameron Walters (cee-dub) cee-dub

View GitHub Profile
Come taste some fine forties, cheetos, and various stank and non-stank bitches
on the sickest corner in SoMA! We're starting early so you can drop by
before heading to your midnight destinations.
Time
~7pm
Location
Jessie at 6th St, in front of the chain link fence
# Template which configures a generic Rails app with Shoulda, Factory Girl,
# HAML, etc while commiting each step into git.
#
# Make sure you have Rails 2.3rc1 or greater installed and run:
# rails -d mysql -m http://gist.github.com/57458
# Helper methods
# Modified version of the "gem" method which places the "config.gem..." lines
# after the examples in config/environment.rb.
require 'strscan'
require 'set'
class SqlQuery < Struct.new(:table, :where, :order)
def to_json
[table, where, order].to_json
end
end
class SqlScanner
def should_be_a_subset(superset, records_selected_by_scope, &condition)
flunk "Your superset is empty" if superset.empty?
flunk "Your scope did not select any records" if records_selected_by_scope.empty?
records_selected_by_block, records_excluded_by_block = superset.partition(&condition)
flunk "Your test condition did not select any records" if records_selected_by_block.empty?
flunk "Your test condition did not exclude any records" if records_excluded_by_block.empty?
records_selected_by_scope.map(&:id).should =~ records_selected_by_block.map(&:id)
end

##YC-backed startup, looking for extremely talented Obj-C/Rails engineer for first technical hire##

We're building a new platform for mobile commerce--an elegant, gorgeous experience for buying and selling. The founding team consists of two people with extensive experience in user acquisition, product design, and development. We've raised money from some of the valley's top investors, and have a ton of support from the most brilliant product minds in SF.

If you're a hacker with interest in an early position at a YC-backed startup, we'd love to talk. We're looking for a hardcore generalist, which means you should:

  • understand undocumented libraries and code bases quickly
  • have a strong understanding of technologies up and down the stack: PostgreSQL, UIWebViews, and everything in between (Rails!)
  • understand what it means to work in an intense startup environment
  • learn quickly, we value raw intelligence pretty highly
@cee-dub
cee-dub / brew-services.rb
Created September 26, 2012 04:15 — forked from bryanveloso/brew-services.rb
External script for homebrew to simplify starting services via launchctl, out of the box support for any formula which implements #startup_plist. (This version fixes the deprecation warning raised on Formula.resolve_alias.)
#!/usr/bin/env ruby -w
# brew-services(1) - Easily start and stop formulas via launchctl
# ===============================================================
#
# ## SYNOPSIS
#
# [<sudo>] `brew services` `list`<br>
# [<sudo>] `brew services` `restart` <formula><br>
# [<sudo>] `brew services` `start` <formula> [<plist>]<br>