Skip to content

Instantly share code, notes, and snippets.

View kevinzen's full-sized avatar

Kevin Bedell kevinzen

View GitHub Profile
#
# Cookbook Name:: delayed_job
# Recipe:: default
#
if ['solo', 'app', 'app_master'].include?(node[:instance_role])
# be sure to replace "app_name" with the name of your application.
run_for_app("maloca") do |app_name, data|
#!/bin/bash
# This script fills in some of the gaps on an Engine Yard cluster deploy.
# -Dana
# I could probably use ARGV for this, but whatever.
THIS_ENV=staging
# move into our home directory
cd
SELECT leads.id,
(SELECT COUNT(*) FROM searches WHERE lead_id = leads.id) AS searches_count,
(SELECT COUNT(*) FROM rental_searches WHERE lead_id = leads.id) AS rental_searches_count,
COALESCE((searches_count + rental_searches_count), 0) as total
FROM leads
WHERE leads.id = 35
# Unknown column 'searches_count' in 'field list'
@kevinzen
kevinzen / LICENSE
Created November 1, 2011 20:22 — forked from hugs/LICENSE
The Node.js "Hello World" web server ported to CoffeeScript
I, Jason Huggins, the author of the work "CoffeeScript Web Server" (2010), irrevocably renounce
all current and future legal rights to the work in any medium whatsoever.
I stand behind the merit of the work, but disclaim all liability for it under law.
I encourage you, the audience, to share, copy, distribute, perform, remix, mash up, interpret,
excerpt, translate, and otherwise enjoy and use the work as you will.
I request that you acknowledge my authorship.