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
# Adapted from here: https://gist.github.com/489093 | |
# Original credit goes to pplante and copyright notice pasted below | |
# Copyright (c) 2010, Philip Plante of EndlessPaths.com | |
# | |
# 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, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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
# Testflight web interface doesn't allow input non-ASCII characters (e.g. Japanese) with Safari! | |
BROWSER = Google Chrome | |
TESTFLIGHT_TEAM_TOKEN_FILE = ./.testflight_team_token | |
TESTFLIGHT_TEAM_TOKEN_URL = https://testflightapp.com/dashboard/team/edit/?next=/api/doc/ | |
TESTFLIGHT_TEAM_TOKEN = $(shell cat $(TESTFLIGHT_TEAM_TOKEN_FILE)) | |
TESTFLIGHT_API_TOKEN_FILE = ~/.testflight_api_token | |
TESTFLIGHT_API_TOKEN_URL = https://testflightapp.com/account/\#api-token | |
TESTFLIGHT_API_TOKEN = $(shell cat $(TESTFLIGHT_API_TOKEN_FILE)) | |
TESTFLIGHT_NOTES = 'This build was uploaded via the upload API' | |
#TESTFLIGHT_OTHER_OPTIONS = -F replace=True |
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/bash | |
# sudo chmod +x tc;sudo mv tc /usr/bin | |
if [[ -z "$1" ]] | |
then | |
printf %s "\ | |
Nifty Timestamp Convertor by Lex Tang | |
tc 2012/12/12 | |
tc 1355283413 | |
" | |
exit |
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
require 'xcoder' | |
project_name = 'TestProject' | |
universal_framework_name = 'Library' | |
# All paths specified are the logical paths within the Xcode Project | |
source_filenames = [ 'TestProject/AppDelegate.m' ] | |
public_headerfilenames = [ 'TestProject/AppDelegate.h' ] | |
project_headerfilenames = [ 'TestProject/Supporting Files/TestProject-Prefix.pch' ] |
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
/* | |
* SenTestingKit does not wait for blocks to finish by default so your test would simply complete | |
* as successful. You need to use a semaphore and keep the run loop going in order for the test | |
* to properly run. | |
*/ | |
- (void)testGetSpots { | |
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); | |
CLLocation location = [[CLLocation alloc] initWithLatitude:70.0 longitude:50.0]; | |
[Spot spotsWithURLString:@"/spots" near:location parameters:[NSDictionary dictionaryWithObject:@"128" forKey:@"per_page"] block:^(NSArray *records) { | |
//sample assert |
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
git_version=`git rev-parse --short HEAD` | |
app_version=`git describe --tags` | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $app_version" $PRODUCT_SETTINGS_PATH | |
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $git_version" $PRODUCT_SETTINGS_PATH |
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
import urllib2 | |
def xiami_decode(s): | |
s = s.strip() | |
if not s: | |
return False | |
result = [] | |
line = int(s[0]) | |
rows = len(s[1:]) / line | |
extra = len(s[1:]) % line |
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
// | |
// AGSynthesizeSingleton.h | |
// Agnomical SDK | |
// | |
// Created by Andrew Garn on 22/03/2012. | |
// Copyright (c) 2012 Andrew Garn. All rights reserved. | |
// | |
/** | |
Singleton interface method macro |
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
import sys,re | |
from urllib2 import urlopen as U, Request as R | |
from json import loads as J | |
API,URL="https://www.googleapis.com/urlshortener/v1/url",sys.argv[1] | |
if re.match('http://goo\.gl/.+',URL):print J(U(API+'?shortUrl=%s'%URL).read())['longUrl'] | |
else:print J(U(R(API,'{"longUrl":"%s"}'%URL,{'Content-Type':'application/json'})).read())['id'] |
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
# -*- coding: utf-8 -*- | |
''' | |
User: ogata | |
Date: 5/31/12 | |
Time: 2:10 PM | |
''' | |
__author__ = 'ogata' | |
import tornado.ioloop |