Skip to content

Instantly share code, notes, and snippets.

Avatar

David Demaree ddemaree

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am ddemaree on github.
  • I am ddemaree (https://keybase.io/ddemaree) on keybase.
  • I have a public key whose fingerprint is BEA0 F423 C8D7 AEDD 8A45 D72D 4102 B0D5 7A7B 617A

To claim this, I am signing this object:

@ddemaree
ddemaree / 0_story.md
Created Apr 24, 2015
Apple Git prompt set up
View 0_story.md

We want our prompts to look like this:

[ddemaree@ddemaree-osx giftboxapp (master)]$ 

In this example, the text inside the square brackets shows the current username and hostname (ddemaree@ddemaree-osx), followed by the name of the current directory (giftboxapp), and finally the current Git branch ((master)) shown in parentheses.

If we have untracked changes to this Git project, those are denoted with an asterisk:

View DataController.m
#pragma mark Data file management stuff
- (void)createEditableCopyOfDatabaseIfNeeded {
// First, test for existence.
BOOL success;
NSFileManager *fileManager = [NSFileManager defaultManager];
NSError *error;
NSString *writableDBPath = [[GBAppDelegate documentsDirectory] stringByAppendingPathComponent:@"/database.sqlite3"];
success = [fileManager fileExistsAtPath:writableDBPath];
View template.rb
inside 'gems/bundler' do
run 'git init'
run 'git pull --depth 1 git://github.com/wycats/bundler.git'
run 'rm -rf .git .gitignore'
end
file 'script/bundle', %{
#!/usr/bin/env ruby
path = File.expand_path(File.join(File.dirname(__FILE__), "..", "gems/bundler/lib"))
$LOAD_PATH.unshift path
View parser.rb
# 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
View Thoughts on Testing.txt
# 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
View bttm_ssh_config.txt
Host <HOSTNAME>.bttm
HostName <HOSTNAME>.<MOBILEME_USER>.members.mac.com
User <MAC_USER>
Port 22
View cover_letter.markdown

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

View Palette.html
<!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;
View model_name_examples.rb
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"