This file contains hidden or 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
# encoding: utf-8 | |
# a rakefile for working with Markdown-based prose. | |
# | |
# quotes: Change dumb quotes to smart quotes, and then back again. | |
# info: Various metrics for vanity's sake. "How many words and | |
# characters are in each file, & total" and other such nonsense. | |
# (Note that this chops off the very last file, which I generally | |
# use as the 'stuff I'm about to write' scratchpad - I don't want | |
# metrics on that! | |
# |
This file contains hidden or 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
#include <stdio.h> | |
int main(int argc, char *argv[]) { | |
const char* c = "1A FF"; | |
int a, b; | |
sscanf(c, "%2x %2x", &a, &b); | |
printf("a: %3d b: %3d\n", a, b); | |
printf("a: %3x b: %3x\n", a, b); |
This file contains hidden or 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
Dear Apple, | |
We need to talk. We love your software, we really do. Or maybe we don't but we want to tell you why | |
so you can try to improve it. We are developers ourselves and we know how hard it is to write | |
software, to find and fix bugs, to know what your users want from your software. We want to file bug | |
reports and feature requests for every bug we find or feature we think of. As a community we want you | |
to know what is important to us, in a way that doesn't require you to trawl through countless blogs | |
and tweets. Unfortunately you're making it so incredibly hard to do so. | |
The only way to really communicate with Apple about what is broken and what we want is Radar. But |
This file contains hidden or 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
// | |
// COADocumentWindowController.m | |
// Co-Author | |
// | |
// Created by Christopher Miller on 4/13/12. | |
// Copyright (c) 2012 FSDEV. All rights reserved. | |
// | |
#import "COADocumentWindowController.h" | |
#import "COAManagedNode.h" |
This file contains hidden or 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
NSDictionary * sharedFoo() { | |
static NSDictionary * foo; | |
static dispatch_once_t f; | |
dispatch_once(f, ^{ | |
foo = [NSDictionary dictionaryWithObjectsForKeys: | |
@"bar", @"foo"]; | |
}; | |
return foo; | |
} |
This file contains hidden or 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
require 'mkmf' | |
require 'set' | |
begin | |
require 'libv8' | |
rescue LoadError | |
require 'rubygems' | |
require 'libv8' | |
end | |
have_library('objc') if RUBY_PLATFORM =~ /darwin/ |
This file contains hidden or 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
Last login: Mon Aug 13 15:54:31 on ttys005 | |
Welcome back, commander! | |
cmiller@cmiller-iMac:~ | |
> which irb | |
/Users/cmiller/.rvm/rubies/ruby-1.9.3-p194/bin/irb | |
cmiller@cmiller-iMac:~ |
This file contains hidden or 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
HOOLIGAN_STYLES={ | |
'themes/hooligan/stylesheets/_sass/style.scss' => 'themes/hooligan/stylesheets/css/style.css' | |
} | |
module Rake | |
class Task | |
def has_dependency? task, inspected_tasks=[] | |
task= Rake::Task[task] if task.class != Rake::Task | |
return true if self == task | |
return false if inspected_tasks.include? self |
This file contains hidden or 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
NSURLRequest* req= [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://fsdev.net"]]; | |
__block NSData* mySite= nil; | |
FSURLOperation* oper= [FSURLOperation URLOperationWithRequest:req completionBlock:^(NSHTTPURLResponse* resp, NSData* payload, NSError* asplosion) { | |
mySite = payload; | |
}]; | |
NSBlockOperation* onFinish= [NSBlockOperation blockOperationWithBlock:^{ | |
NSMutableURLRequest* spamReq= [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://www.fsdev.net/"]]; |
This file contains hidden or 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
#import <Foundation/Foundation.h> | |
#import "FSArguments.h" | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
FSArgumentSignature * helpFlag = [FSArgumentSignature argumentSignatureWithFormat:@"[-h --help]"]; | |
FSArgumentSignature * inFileFlag = [FSArgumentSignature argumentSignatureWithFormat:@"[-i --in-file]={1,}"]; | |
FSArgumentSignature * outFileFlag = [FSArgumentSignature argumentSignatureWithFormat:@"[-o --out-file]="]; | |
NSSet * signatures = [NSSet setWithObjects:helpFlag, inFileFlag, outFileFlag, nil]; |