Skip to content

Instantly share code, notes, and snippets.

View teddyzetterlund's full-sized avatar

Teddy Zetterlund teddyzetterlund

View GitHub Profile

OAIJ (Oat In A Jar)

Kalorisnål och proteinfylld frukost/mellis.

Låt stå över natten (i en tilltäppt burk).

Standard

  • 1,25 dl havregryn
  • 1,5 dl lättkesella/kvarg

In the light of @dhh's recent presentation at #railsconf you do well in remembering this section from @37signals' book Getting Real:

“You take too much of a black and white view.”

If our tone seems too know-it-allish, bear with us. We think it’s better to present ideas in bold strokes than to be wishy-washy about it. If that comes off as cocky or arrogant, so be it. We’d rather be provocative than water everything down with “it depends...” Of course there will be times when these rules need to be stretched or broken. And some of these tactics may not apply to your situation. Use your judgement and imagination.

@teddyzetterlund
teddyzetterlund / clipboard-to-omnifocus-inbox.scpt
Last active August 29, 2015 14:00
Adds a task directly to the OmniFocus inbox for each paragraph in the current clipboard.
set _clipboard to get the clipboard
set _tasks to paragraphs of _clipboard
tell application "OmniFocus"
tell default document
repeat with _task in _tasks
make new inbox task with properties {name:_task}
end repeat
end tell
end tell
/**
* base/box-sizing
*
* Apply a natural box layout model to all elements while respecting
* plugins or other components that leverage other behavior.
*
* http://www.paulirish.com/2012/box-sizing-border-box-ftw/
* http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
*/

Keybase proof

I hereby claim:

  • I am teddyzetterlund on github.
  • I am teddyzetterlund (https://keybase.io/teddyzetterlund) on keybase.
  • I have a public key whose fingerprint is 65EA 6853 C058 5B40 B76F B60C 7437 B583 CD00 C95F

To claim this, I am signing this object:

Rekommenderade bloggar

HTML, CSS, JavaScript & UX

Gränssnittsdesign och användarbarhet

@teddyzetterlund
teddyzetterlund / dead-center.css
Created December 10, 2011 19:28
CSS utility classes
/**
* Dead center an image both vertically and horizontally inside
* a containing element.
*
* Notes:
* The dead-center container needs height and width set,
* and the image to be centered can't exceed those dimenstions.
*
* Example:
* <div class="example dead-center">
blockquote::after {
content: "— 014\ " attr(cite);
display: block;
text-align: right;
}
@teddyzetterlund
teddyzetterlund / pre_commit.rb
Created June 25, 2012 21:43
Rename to pre_commit and put it in <your-project>/.git/hooks to require commits to follow policy
#!/usr/bin/env ruby
# Compare commit message formatting to formatting policy.
#
# Message should include a Pivotal Story ID reference
# and an optional state change keyword.
#
# Example: [Fixes #12345]
message_file = ARGV[0]