Skip to content

Instantly share code, notes, and snippets.

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discussions around concrete examples, not handy-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@kevinlawler
kevinlawler / KVO + Singleton Example
Created July 7, 2012 06:18
Using KVO with NSSingleton
Bank *b = [Bank instance];
Person *p = [Person instance];
[b addObserver:p forKeyPath:@"accountBalance" options:NSKeyValueObservingOptionNew context:NULL];
b.accountBalance = [NSNumber numberWithInt:99];
#import "NSSingleton.h"
@interface Bank : NSSingleton
@property (nonatomic, strong) NSNumber *accountBalance;
@end
@kevinlawler
kevinlawler / .gitconfig
Created June 19, 2012 02:26 — forked from mbbx6spp/.gitconfig
Susan Potter's .gitconfig file from November 2007 blog post. Updated since November 2007 with new aliases or options.
# Migrating my old .gitconfig blog post from 2007 to here so I can update it easier.
# Original URL:
# http://geek.susanpotter.net/2007/11/my-gitconfig.html
[user]
name = Susan Potter # make sure you change this
email = me@susanpotter.net # make sure you change this
[color]
diff = auto
status = auto
branch = auto
@kevinlawler
kevinlawler / hack.sh
Created March 31, 2012 17:49 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@kevinlawler
kevinlawler / gist:1167117
Created August 24, 2011 01:48 — forked from todd1251/gist:1161262
Working with Core Plot trunk as at 22/08/2011
// Modified from: http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application
// NOTE: needs -load_all linker flag; might not be quite right - red/blue data line styles are not working
- (void)viewDidLoad
{
[super viewDidLoad];
graph = [[CPTXYGraph alloc] initWithFrame: self.view.bounds];
CPTGraphHostingView *hostingView = (CPTGraphHostingView *)self.view;
@kevinlawler
kevinlawler / bcrypt.php
Created August 10, 2011 22:07 — forked from BaylorRae/bcrypt.php
How to use bcrypt in PHP to safely store passwords (PHP 5.3+ only)
<?php
// secure hashing of passwords using bcrypt, needs PHP 5.3+
// see http://codahale.com/how-to-safely-store-a-password/
// salt for bcrypt needs to be 22 base64 characters (but just [./0-9A-Za-z]), see http://php.net/crypt
// just an example; please use something more secure/random than sha1(microtime) :)
$salt = substr(str_replace('+', '.', base64_encode(sha1(microtime(true), true))), 0, 22);
// 2a is the bcrypt algorithm selector, see http://php.net/crypt