manicwave

Surf the wave

Links for 2009-12-19

Permalink

f you’re a Cocoa developer, you are morally required to open System Preferences, Keyboard & Mouse, Keyboard Shortcuts and select All controls in Full keyboard access. This is not optional. If you do not comply, you will be driven out of the Continuum and forced to spend the rest of your pitiful mortal existence writing kernel extensions.

(tags: cocoa nextkeyview debugging)

Links for 2009-12-15

Permalink

(tags: html email marketing)

assertTrue( ) Techno-cruft from around the Web, plus really pithy observations about Java and other future legacy technologies. Yes, pithy I say.

Wednesday, December 09, 2009 NoSQL Required Reading I've been trying to follow the fast-moving world of NoSQL lately, and -- like a visit to the carnival funhouse -- it has left me with double vision, queasy stomach, and a staggering gait. (And it's not even Saturday morning...) Yet I find myself coming back for more.

If you're new to NoSQL, you'll want to do a bit of background reading. I'll keep this quick and limit my recommendations to just the essentials:

  1. The Amazon Dynamo paper is classic. Almost everyone in the NoSQL world has read this paper.

  2. Google's Bigtable paper. Again, very widely read.

  3. Werner Vogels's "Eventually Consistent" (originally published in ACM Queue) is absolutely the one article you should read if you're not clear on the rationale behind "eventual consistency."

  4. Brewer's CAP Theorem (a foundational b

(tags: nosql reading technology)

Links for 2009-12-14

Permalink

Healthy Oatmeal Cookies (with Honey)

Ingredients:

Dry ingredients

1 cup whole wheat flour (a pinch more depending on the moisture of the mix) 1 1/2 cups of Large Flake Rolled Oats (smaller flake is ok too) 1/2 tsp baking soda 1/2 tsp baking powder 1/2 tsp salt 1 Tbsp Cinnamon (I actually use about 3 Tbsp--got to love cinnamon) 1/2 tsp Nutmeg (optional) Wet ingredients

1/2 cup honey 1/2 cup oil (corn, grapeseed or olive) * you can also use some applesauce to replace some of the oil if you wish* 1 Tablespoon Molasses 1 egg (beat with 1 Tbsp Water) 1 tsp Vanilla Yummy ingredients

1/2 cup raisins (1 cup for my Dad's batch) 1/2 cup walnuts (more for my Dad's)!! Preparation:

In a large bowl, mix all the dry ingredients together. In a medium bowl, mix all the wet ingredients together. Hint: when measuring out the honey, spray the measuring cup with oil or baking spray--your honey won't stick). Mix the wet stuff with the dry stuff. Add the raisins and walnuts and mix. If the mixture seem

(tags: cookies recipes cooking)

Git Clone From Safari

Permalink

It is often the late night exploration of code in the wild that gives rise to these cute little hacks.

With my wrist tiring of flipping between safari and terminal, the following was born.

Goal

git clone the repository ref found in the system pasteboard

Scenario

When perusing gitHub, I'll find something I want to check out. I click on the "clone" button which copies the git reference to the clipboard. I typically flip over to a terminal session, change directory to my favorite dumping grounds, and do a git clone Cmd-V enter.

Here's a script that will do all of that. The secret sauce is teaming this up with something like FastScripts (an excellent status bar accessory).

#!/bin/sh
REPO=`pbpaste`
DUMPDIR=~/dev/extern

cd $DUMPDIR && /usr/local/git/bin/git clone $REPO
EXITCODE=$?
if [ "$EXITCODE" -ne "0" ]; then
    echo "Download of $REPO failed: $EXITCODE" | /usr/local/bin/growlnotify -p 1 "Clone Failed"
else
    echo "Download of $REPO successful" | /usr/local/bin/growlnotify "Clone Succeeded"
fi

What's happening here?

First we grab the repo reference from the pasteboard using pbpaste. Then we cd to our dumping grounds, execute the git clone. If it fails (because it's already there, no access, etc) we use growlnotify to throw up the appropriate message.

I bind this script in ~/Library/Scripts/Applications/Safari and then use Cmd- Shift-C - so click to copy, Cmd-Shift-C to clone.