Skip to content

Instantly share code, notes, and snippets.

@ddemaree
ddemaree / GBItemDetailCell.m
Created February 1, 2011 19:54
Yes, @polgfred, some people do align setters in languages other than Ruby. :)
#import "GBItemDetailCell.h"
@implementation GBItemDetailCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
// Text view for item value
// Dimensions are identical to the value label;
@ddemaree
ddemaree / mysql.rb
Created January 3, 2011 09:36
Homebrew formula for installing Metromix's legacy MySQL 5.0.34
require 'formula'
class Mysql < Formula
homepage 'http://dev.mysql.com/doc/refman/5.0/en/'
url 'http://lockjaw.s3.amazonaws.com/homebrew/mysql-5.0.34.tar.gz'
md5 '043c8cb8820b6d1fb67d679e54daba5d'
depends_on 'readline'
def options
@ddemaree
ddemaree / gist:652189
Created October 28, 2010 19:49 — forked from obie/gist:652092
Hashrocket, the best web design and development company in the universe, is
staffing up its Jacksonville Beach, FL headquarters and Chicago branch office.
This is your chance to consult clients around the world on the coolest projects
alongside an amazingly talented group of peers.
Minimum qualifications:
- Solid communications and client relationship skills
- At least 2 years of Rails programming experience*
- At least 5 years of web development experience
- Demonstrable knowledge of BDD and TDD techiques
@ddemaree
ddemaree / index.html.erb
Created October 25, 2010 20:10
Rails 3 ERb template showing a simple syntax for doing REST forms without unnecessary DOM class/ID cruft
<% form_tag @user = User.new do %>
<% fields_for @user do |user_form| %>
<div class="field">
<label>Name</label>
<%= user_form.text_field :name %>
</div>
<% end %>
<% end %>
<% form_tag @user = User.first, :method => :put do %>
Ando::BlogPost.model_name #=> "blog_post"
# Look at all these useful variations!
Ando::BlogPost.model_name.singular #=> "ando_blog_post"
Ando::BlogPost.model_name.plural #=> "ando_blog_posts"
Ando::BlogPost.model_name.collection #=> "ando/blog_posts"
Ando::BlogPost.model_name.element #=> "blog_post"
Ando::BlogPost.model_name.partial_path #=> "blog_posts/blog_post"
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>COLOURlovers - Fall</title>
<style type="text/css"><!--
html {
padding: 0px;
margin: 0px;

Hi, I'm David Demaree, and I'm looking for an awesome job.

Two or three things about me:

For the last decade or so I've been a Chicagoan, and for about five years a professional web designer/developer. I've been making web sites since I was 14, designing things since even before that. I got my first desktop publishing tools the year I finished fifth grade, my first good markers in elementary school, my first crayons before I could walk.

Design, digital or physical, is in my blood. I went to college at the School of the Art Institute of Chicago, studying mostly film/video/new media during the day and teaching myself PHP, MySQL and Ruby on Rails at night.

While the list of skills on my resumé may imply "gearhead nerd," I come from a fine arts background, and I'm never happier at work than when I can use cutting-edge tools to reach out to audiences and make real, human connections. My user interface work has given me a sense for utility; my video and marketing work has practiced me in the art of seduction. I

Host <HOSTNAME>.bttm
HostName <HOSTNAME>.<MOBILEME_USER>.members.mac.com
User <MAC_USER>
Port 22
# Thoughts on Testing #
Last night I watched this video rant from last October by [Hampton Catlin][hcatlin] (creator of HAML), in which he makes the argument that test-driven code is often buggier and more fragile than un-tested code:
<catlin video>
Shocking, right? Arguing against testing is the sort of thing that gets one thrown out of the Ruby country club, since we're supposed to be [testing all the fucking time][tatft], and most Ruby job descriptions these days are not only aimed at programmers who test but at ones who test using [the latest, hottest tools.][cucumberjobs]
I, for one, have been sipping more of the testing Kool-Aid in the last several months (thanks to the excellent Shoulda and Factory Girl libraries), but I'm also a testing skeptic. My first programming language was PHP, and my background is more in traditional design and media production than computer science. That's to say: I came to programming from a tradition where quantifiable, provable successes are rare, and knowing (and being
# line 1 "src/parser.rl"
#
# THIS FILE IS NONSENSE. IT IS GENERATED BY RAGEL, AND IS NOT
# MEANT TO BE HUMAN READABLE CODE. BEST TO JUST SHRUG YOUR
# SHOULDERS AND MOVE ON. ALL THAT MATTERS IS THAT YOU CAN CALL
#
# Ticktock::Parser._parse(string)
#
# TO TRANSLATE A STRING IN TICKTOCK MESSAGE FORMAT INTO