Public Gists by abloom

Gravatar
Fri Nov 06 08:43:37 -0800 2009
1
2
3
sudo su postgres -c '/opt/local/lib/postgresql84/bin/initdb -D /opt/local/var/db/postgresql84/defaultdb'
sudo sed -i -e 's/#client_min_messages = notice/client_min_messages = error/' /opt/local/var/db/postgresql84/defaultdb/postgresql.conf
sudo sed -i -e 's/#log_min_messages = warning/log_min_mess
Gravatar
Wed Nov 04 12:48:30 -0800 2009
1
2
3
abloom:~/Sites $ hg clone git://gitrepo@git.transis.net:mms mms.hg
importing Hg objects into Git
** unknown exception encountered, details follow
Gravatar
Thu Sep 17 09:07:43 -0700 2009
1
2
3
class Something
  CONSTANT = ["a", "b", "c"]
end
Gravatar
Tue Aug 18 13:59:50 -0700 2009
1
2
3
[ui]
username = Andrew Bloom <abloom@leapfrogonline.com>
 
Gravatar
Tue Aug 18 12:21:09 -0700 2009
1
2
3
abloom:~/Code $ hg clone --traceback git://github.com/mislav/will_paginate.git
*** failed to import extension hgext.hg-git from ~/Code/hg-git: No module named index
Traceback (most recent call last):
Gravatar
Thu Aug 06 07:40:50 -0700 2009
1
2
3
body { background-color: #fff; color: #333; }
 
body, p, ol, ul, td {
Gravatar
Tue Aug 04 12:06:52 -0700 2009
1
2
3
require 'rubygems'
require 'pg'
a = '{"applicant": {"external_client_code": "090803613", "attributes": {"phone": "1234567890", "last_name": "b", "comments": "8\" test", "zipcode": "12345", "call": "Call my Home Number", "first_name": "a", "call_phone": "", "email": "a@b.com"}}}'
Gravatar
Mon Jul 20 08:22:00 -0700 2009
1
2
3
<% form_for :channel_config do |cc| %>
  <% fields_for(:serial_config) do |sc| %>
    <%= cc.text_field :name %>
Gravatar
Mon Jul 13 11:29:54 -0700 2009
1
2
3
module SpecialHelper
  def method_with_chain
    ...
Gravatar
Tue Jul 07 08:33:24 -0700 2009
1
2
3
  Site Load (0.2ms) SELECT * FROM "sites" WHERE ("sites"."domain" = 'culliganwaterservice.com') LIMIT 1
  Experience Load (0.4ms) SELECT * FROM "experiences" WHERE (selector = 'culligan_zip' AND (start_date <= '2009-07-06 17:05:43' OR start_date IS NULL) AND (end_date > '2009-07-06 17:05:43' OR end_date IS NULL)) LIMIT 1
  OfferGroup Load (0.2ms) SELECT * FROM "offer_groups" WHERE ("offer_groups"."id" = 7)
Gravatar
Mon Jul 06 13:43:56 -0700 2009
1
2
3
  # convert 3 field dates to 1 date object. delete the 3 fields when we're done
  def convert_multi_param_fields!(params)
    @experience.cms.form_fields.each do |fe|
Gravatar
Tue Jun 09 07:07:33 -0700 2009
1
2
3
ActionController::Routing::Routes.draw do |map|
  map.resources :fans
 
Gravatar
Mon Jun 08 12:47:38 -0700 2009
1
2
3
class AbstractTopLevelController < ApplicationController
  class_inheritable_accessor :model
 
Gravatar
Tue Jun 02 13:54:45 -0700 2009
1
2
3
                                                                                                                                                                                                                                                               
Delivered-To: andrew@andrewkbloom.com
Received: by 10.151.125.2 with SMTP id c2cs407725ybn;
Gravatar
Tue Jun 02 12:01:35 -0700 2009
1
2
3
    def set_form_elements!(form_elements)
      @form_elements = form_elements
      
Gravatar
Thu May 28 07:59:34 -0700 2009
1
2
3
#!/usr/bin/ruby
 
cmd = "#{File.dirname(__FILE__)}/tmp.rb"
Gravatar
Fri May 22 09:36:38 -0700 2009
1
2
3
module OverrideHelper
  # Call this method to setup a default content block by name. This content will be rendered into the page
  # unless a content_block with the same name also exists somewhere else in the rendered response.
Gravatar
Wed May 20 07:33:58 -0700 2009
1
2
3
#include <stdlib.h>
#include <string.h>
#include <Nixie.h>
Gravatar
Tue May 19 07:35:07 -0700 2009
1
2
3
class BoardController < ActionController::Base
  before_filter :build_nav_bar_links
  
Gravatar
Mon May 18 11:19:32 -0700 2009
1
2
3
# lib/link_bar.rb
require 'singleton'