Skip to content

Instantly share code, notes, and snippets.

toolbear /
Last active August 29, 2015 13:59
debating ownCloud's selection of PHP

A side-channel response to my "recent tirade against PHP on BoingBoing".

Subject: Computer language designers, or how to shoot yourself in the foot.
From: CJ <c…>
To: Tim Taylor <>
Date: Mon, 14 Apr 2014 22:15:37 -0500

In your recent tirade against PHP on BoingBoing, you capped your arguments with:

My top gripes are that PHP:

set -ex
# This scripts allows you to upload a binary to the iTunes Connect Store and do it for a specific app_id
# Because when you have multiple apps in status for download, xcodebuild upload will complain that multiple apps are in wait status
# Requires application loader to be installed
# See
# Itunes Connect username & password
toolbear / gist:861192
Created March 8, 2011 22:10
Using p4merge with Git Mac OS X
View gist:861192

Git config

$ git config --global -e
    keepBackup = false;
    tool = p4merge
[mergetool "p4merge"]
    cmd = p4merge "$BASE" "$REMOTE" "$LOCAL" "$MERGED"

keepTemporaries = false

toolbear / capslock2control.reg
Created March 23, 2011 18:43
Remap Capslock key to Left Control key in Windows
View capslock2control.reg
[HKEY_CURRENT_USER\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
toolbear /
Created June 9, 2011 18:11
decoding XML inside <content>{encoded XML}</content>
# usage:
# perl FILE
use XML::LibXML;
binmode STDOUT;
my $parser = XML::LibXML->new();
my $doc = $parser->parse_file($ARGV[0]);
toolbear / gist:1384302
Created November 21, 2011 23:10
prompt for jsibbold
View gist:1384302
if [ "$PS1" != "" ] ; then # Interactive shells only
case "$TERM" in
export PS1="\[\033[0;36m\]\u@$(hostname):\$($HOME/.shortpwd)\[\033[0m\]\$ "
export PS1="\u@$(hostname):\$($HOME/.shortpwd)\$ "
toolbear / ProtocolConformingReturnTypeExpectationsSpec.m
Created March 12, 2012 18:06
Kiwi false pass with protocol conforming objects as return types
View ProtocolConformingReturnTypeExpectationsSpec.m
#import "Kiwi.h"
@protocol Proto <NSObject>
- (void)beep;
@interface Conformer : NSObject <Proto>
@implementation Conformer
- (void)beep {}
toolbear / gist:3152486
Created July 20, 2012 18:41
An `any` matcher for Kiwi similar to Mockito's `any()`
View gist:3152486
@interface Any : NSObject <HCMatcher>
@implementation Any
- (BOOL)isEqual:(id)object { return object != [KWNull null]; }
- (BOOL)matches:(id)item { return YES; }
toolbear /
Created August 24, 2012 16:29
Cocoa Gets Its Big Boy Pants

The programming environment for iOS and OS X — shorthand Cocoa — is a fascinating mix of polished, mature tools and immature or non-existent tools. This shows in the relative recency of official testing support, lack of official library dependency management, and the new growth of projects in the Cocoa ecosystem to fill these gaps. Mature in terms of getting products to market, the iOS developer community is just now walking around on its feet when it comes to practices Rubyists, for example, take for granted.

Demonstrated through building a new Cocoa Touch app, I will show what modern iOS development looks like using mostly Open Source tools and frameworks:

  • CocoaPods for managing library dependencies
  • Kiwi BDD for RSpec style testing
  • Frank/Cucumber for automated specification testing of the UI
  • Jenkins for Continuous Integration
  • Test Flight for over-the-air Continuous Delivery
toolbear / NSString+DLStringUtil.h
Created September 5, 2012 19:35
Category on NSString for Java developers accustomed to StringUtils
View NSString+DLStringUtil.h
#import <Foundation/Foundation.h>
@interface NSString (DLStringUtil)
- (BOOL)DL_isNotEmpty;
- (BOOL)DL_isNotBlank;