Skip to content

Instantly share code, notes, and snippets.

Avatar

David Demaree ddemaree

View GitHub Profile
@ddemaree
ddemaree / index.html.erb
Created Oct 25, 2010
Rails 3 ERb template showing a simple syntax for doing REST forms without unnecessary DOM class/ID cruft
View index.html.erb
<% 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 %>
View gist:652189
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 / mysql.rb
Created Jan 3, 2011
Homebrew formula for installing Metromix's legacy MySQL 5.0.34
View mysql.rb
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 / GBItemDetailCell.m
Created Feb 1, 2011
Yes, @polgfred, some people do align setters in languages other than Ruby. :)
View GBItemDetailCell.m
#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 / config.ru
Created Apr 9, 2011
Rackup file for Rails 2.3.x projects (very useful for getting legacy apps running on pow.cx)
View config.ru
# Rails.root/config.ru
require "config/environment"
use Rails::Rack::LogTailer
use Rails::Rack::Static
run ActionController::Dispatcher.new
@ddemaree
ddemaree / .gitignore
Created Oct 6, 2011
@font-face code examples for AIGA Chicago presentation
View .gitignore
*.woff
*.svg
*.ttf
*.eot
@ddemaree
ddemaree / hiw01_ruby.mdown
Created Feb 25, 2012
How I Work, Part I: Ruby
View hiw01_ruby.mdown

How I Work, Part 1: Ruby

Since the first of the year I've been trying to write one of that sort of post where the blogger describes the tools they use. Obviously, I haven't succeeded yet. And what's more, it's taken me until now to precisely identify why it's been so hard.

It's not that I find these "setup" posts to be a form of pornography. They are, and I do, but in this scenario I would be the porn star, not the lonely guy who looks for tips on productivity blogs in lieu of an actual life. And it's not that my setup isn't interesting. It's not that mind-blowing or innovative, honestly, but over the years I've learned a lot about what I need to do my job and that knowledge feels worth sharing.

What I've concluded, rather, is that in trying to talk about my tools in a single post, I was going about it totally the wrong way. Tools and best practices are things I care deeply about, and trying to cram everything into a single, 5,000-word monster post would be exhausting for me to write, at least as tir

View 2012-04-27-cucumber.mdown

RubySource Talks to Matt Wynne About Cucumber

Link: http://rubysource.com/matt-wynne-on-using-cucumber/

Wynne is the co-author (with Aslak Hellesøy) of Pragmatic's The Cucumber Book. In this interview by Pat Shaughnessy, he explains a bit about what Cucumber is for and how it can help teams deliver good software:

Q: So do you view Cucumber as a pair or group programming tool?

Wynne: I view it as a team communication or collaboration tool really. So by playing the game, forcing yourselves to try to describe what you want the software to do, together, what you end up doing is surfacing all the things that you haven’t actually figured out yet and all the things that you’re not really sure about. This is what Dan North calls deliberate discovery.

@ddemaree
ddemaree / 01_rubymotion.mdown
Created May 9, 2012
DRAFT: RubyMotion first impressions
View 01_rubymotion.mdown

Title: RubyMotion first impressions

For the last couple of days I've been playing with RubyMotion, Laurent Sansonetti's amazing new toolchain that allows developers to write fully-fledged, native Cocoa apps for iOS using MacRuby. Having seen some of what the MacRuby community is doing with it, heard what guys like Marco Arment and John Siracusa have to say about it, and having cut myself on some of its rough edges, it feels like a good time to stop and take down some first impressions.

What I like

While it's true RubyMotion isn't that much less of a black box than Xcode — in that it's still a proprietary framework that slurps in code and spits out either errors or a working iOS app — being able to configure and build a project using only a Ruby Rakefile feels much simpler and nicer.

RubyMotion's configuration DSL is simple and task-oriented, and effectively does a job that in Xcode is spread across six or seven (or more?) different .plist files or project settings.

@ddemaree
ddemaree / shell_output.txt
Created May 15, 2012
Error compiling Core Data model in RubyMotion 1.4
View shell_output.txt
› rake
Build ./build/iPhoneSimulator-5.1-Development
Build ./vendor/AFNetworking
Link ./build/iPhoneSimulator-5.1-Development/CB Ruby.app/CB Ruby
Compile ./resources/Cashbox.xcdatamodeld
./resources/Cashbox.xcdatamodeld:0: error: Compilation failed for data model at path './resources/Cashbox.momd/Cashbox.mom'
rake aborted!
Command failed with status (1): ["/Applications/Xcode.app/Contents/Develope...]
Tasks: TOP => default => simulator => build:simulator