Skip to content

Instantly share code, notes, and snippets.

View trawor's full-sized avatar
💭
I may be slow to respond.

Travis trawor

💭
I may be slow to respond.
View GitHub Profile
@akisute
akisute / AsyncSenTestingKitTests.h
Created March 17, 2012 02:23
SenAsyncTestCase - Asynchronous capable SenTestCase
//
// AsyncSenTestingKitTests.h
// AsyncSenTestingKitTests
//
// Created by 小野 将司 on 12/03/17.
// Copyright (c) 2012年 AppBankGames Inc. All rights reserved.
//
#import <SenTestingKit/SenTestingKit.h>
#import "SenAsyncTestCase.h"
@ipconfiger
ipconfiger / __init__.py
Created January 5, 2012 12:48
OAuth包,实现了sina,QQ,网易,搜狐的OAuth认证
# -*- Encoding: utf-8 -*-
import base64
import binascii
import cgi
import hashlib
import hmac
import logging
import time
import urllib
import urlparse
@zbyhoo
zbyhoo / solve_pbxproj_merge_conflict.sh
Created May 5, 2011 09:00
Solving pbxproj files git merge conflicts when two users add files at the same time.
#!/bin/sh
projectfile=`find -d . -name 'project.pbxproj'`
projectdir=`echo *.xcodeproj`
projectfile="${projectdir}/project.pbxproj"
tempfile="${projectdir}/project.pbxproj.out"
savefile="${projectdir}/project.pbxproj.mergesave"
cat $projectfile | grep -v "<<<<<<< HEAD" | grep -v "=======" | grep -v "^>>>>>>> " > $tempfile
cp $projectfile $savefile
@ironfounderson
ironfounderson / gist:751259
Created December 22, 2010 08:16
Loading content from a file contained as a bundle resource within a unit test target
- (NSString *)contentOfXMLFile:(NSString *)filename {
NSString *contentPath = [[NSBundle bundleForClass:[self class]] pathForResource:filename
ofType:@"xml"];
NSURL *contentURL = [NSURL fileURLWithPath:contentPath];
return [NSString stringWithContentsOfURL:contentURL
encoding:NSUTF8StringEncoding
error:nil];
}