This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// by Colin Barrett (colin at springs and struts dot com) | |
// I release this sketch to the community under the MIT License. | |
// No really this is just a sketch I haven't even compiled it or anything. | |
// Other ides: | |
// - Failure & success completion selectors ? | |
// - Single delegate method called on both success and failure. | |
@interface NiceURLConnection : NSURLConnection { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# (c) 2009 Colin Barrett <[email protected]> | |
# MIT Licensed. | |
echo ' .cstring | |
format_string: | |
.asciz "Result: %d\\n" | |
.text | |
.globl _main | |
_main: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% cat main.py | |
from config import config, set_config, print_config | |
print "1: %s" % (config) | |
set_config({'hello': 'world'}) | |
print "3: %s" % (config) | |
print_config() | |
% cat config.py | |
config = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define BLOCK(...) ({ __block __typeof__(self) bself = self; __VA_ARGS__(); )} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% ls -lah .dropbox ~ | |
total 89776 | |
drwxr-xr-x 11 cbarrett staff 374B May 13 11:40 . | |
drwxr-xr-x+ 56 cbarrett staff 1.9K Apr 20 18:54 .. | |
-rw-r--r-- 1 cbarrett staff 33K May 13 11:40 config.db | |
-rw-r--r-- 1 cbarrett staff 3B May 3 17:29 dropbox.pid | |
-rw------- 1 cbarrett staff 8.0M May 13 11:40 filecache.db | |
drwxr-xr-x 5 cbarrett staff 170B Feb 28 2010 finderplugin | |
-rw-r--r-- 1 cbarrett staff 73B May 3 17:30 host.db | |
-rw-r--r-- 1 cbarrett staff 24B Aug 23 2010 ignore.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SSMutableIndexPathSet.h | |
// MutableIndexPathSet Test | |
// | |
// Created by Colin Barrett on 11/19/10. | |
// Copyright 2010 __MyCompanyName__. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autoload -Uz vcs_info | |
zstyle ':vcs_info:*' enable hg | |
zstyle ':vcs_info:hg*' formats "%F{green}%b%f" | |
zstyle ':vcs_info:hg*' actionformats "%F{red}%a%f %F{green}%b%f" | |
zstyle ':vcs_info:hg*+set-message:*' hooks no-default-branch | |
function +vi-no-default-branch() { | |
[[ "${hook_com[branch_orig]}" != "default" ]] && return 0 | |
ret=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// stringByAddingPercentEscapesUsingEncoding is pretty conservative about escaping characters, which is fine most of the time. This method however escapes *all special characters*, allowing any arbitrary string to be used when building any part of a URL. | |
// (c) 2011 Springs & Struts. Released under MIT-style license. See: http://www.opensource.org/licenses/mit-license.php | |
@interface NSString (SSURLEscaping) | |
- (NSString *)ss_stringByEscapingAllURLCharactersForRealWithEncoding:(NSStringEncoding)encoding; | |
@end | |
@implementation NSString (SSURLEscaping) | |
- (NSString *)ss_stringByEscapingAllURLCharactersForRealWithEncoding:(NSStringEncoding)encoding |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Terminal" | |
open (path to desktop folder) | |
end tell |
OlderNewer