Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / gist:269762
Created January 5, 2010 21:43
GCC_VERSION = com.apple.compilers.llvm.clang.1_0
RUN_CLANG_STATIC_ANALYZER = YES
CC = /Volumes/Space/Users/bungi/Source/LLVM/llvm/Release/bin/clang
@gvkhna
gvkhna / AppleMediaKeyController.h
Created August 23, 2010 20:51
Apple Media Key hotkey override
//
// AppleMediaKeyController.h
//
// Modified by Gaurav Khanna on 8/17/10.
// SOURCE: http://github.com/sweetfm/SweetFM/blob/master/Source/HMediaKeys.h
//
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without restriction,
@ddb
ddb / XCObject.h
Created February 13, 2011 07:30
a declaration of the types used in an Xcode project file.
//
// XCObject.h
// XcodeProj
//
// Created by David Brown on 2/13/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
// Hosey_warnings.xcconfig
// see http://boredzo.org/blog/archives/2009-11-07/warnings
// http://rentzsch.tumblr.com/post/237349423/hoseyifyxcodewarnings-scpt
// http://tewha.net/2010/11/xcode-warnings/
GCC_TREAT_WARNINGS_AS_ERRORS = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
@omnivector
omnivector / CCBlockTableViewDataSource.h
Created April 27, 2011 17:35
Block based data source / delegate
//
// CCBlockTableViewDataSource.h
//
// Created by Tristan O'Tierney on 1/24/11.
//
#import <UIKit/UIKit.h>
@interface CCBlockTableViewDataSource : NSObject <UITableViewDataSource, UITableViewDelegate> {
@jpwatts
jpwatts / xcode-git-version.sh
Created May 11, 2011 16:42
This Xcode 4 build phase script automatically sets the version and short version string of an application bundle based on information from the containing Git repository.
#!/bin/bash
# This script automatically sets the version and short version string of
# an Xcode project from the Git repository containing the project.
#
# To use this script in Xcode 4, add the contents to a "Run Script" build
# phase for your application target.
set -o errexit
set -o nounset
@jonsterling
jonsterling / gist:1117345
Created July 31, 2011 23:30
Feeds I like
@mbostock
mbostock / .block
Last active February 4, 2023 21:57
DOM-to-Canvas using D3
license: gpl-3.0
@steipete
steipete / gist:1501754
Created December 20, 2011 14:34
Use Xcode to automatically set git hash
git=`sh /etc/profile; which git`
version=`$git describe --tags --always`
count=`$git rev-list --all |wc -l`
echo -e "#define GIT_VERSION $version\n#define GIT_COMMIT_COUNT $count" > InfoPlist.h
OLD:
FMDatabase *db = [FMDatabase databaseWithPath:dbPath];
[db executeUpdate:@"insert into namedparamtest values (:a, :b, :c, :d)" withParameterDictionary:dictionaryArgs];
NEW:
FMDatabaseQueue *queue = [FMDatabaseQueue databaseQueueWithPath:dbPath];
[queue inDatabase:^(FMDatabase *db) {