Skip to content

Instantly share code, notes, and snippets.

View lottadot's full-sized avatar

Shane Zatezalo lottadot

View GitHub Profile
#!/bin/sh
if [ "$BUILD_STYLE" == "Debug" ]; then
echo "Skipping debug"
exit 0;
fi
if [ "$EFFECTIVE_PLATFORM_NAME" == "-iphonesimulator" ]; then
echo "Skipping simulator build"
exit 0;
if ([UIDevice instancesRespondToSelector:@selector(userInterfaceIdiom)]
          && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
     // on iPad, running as iPad
} else {
     // either not in 3.2, or on an iPhone, or on iPad in iPhone compatability mode
@lottadot
lottadot / gist:750960
Created December 22, 2010 02:02
xcode open projects from CLI
/Developer/Applications/Xcode.app/Contents/MacOS/Xcode *.xcodeproj &
File: /SourceCache/DevToolsBase/DevToolsBase-1763/pbxcore/Target.subproj/PBXTarget.m
Line: 4113
Object: <PBXNativeTarget:0x200a1fd00>
Method: targetBuildContext
Assertion failed: (nil != [self project]) && ![[self project] isClosed]
https://github.com/trptcolin/consistency_fail
https://github.com/dsboulder/query_reviewer
@lottadot
lottadot / gist:1133056
Created August 8, 2011 23:43
iOS CLLocation Category to force a custom lat/lon
//
// CLLocation+Simulator.h
// had
//
// Created by Shane Zatezalo on 7/13/11.
// Copyright 2011 Lottadot, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
$ md5sum xcode_4.2_and_ios_5_sdk_beta_5_for_lion.dmg
3a4810457ad580de0f7cfb4bd78cd9a7 xcode_4.2_and_ios_5_sdk_beta_5_for_lion.dmg
@lottadot
lottadot / gist:3716778
Created September 13, 2012 19:03
Building an iOS Enterpise IPA
xcrun -sdk iphoneos PackageApplication \
"build/Enterprise-iphoneos/some.app" \
-o "${WORKSPACE}/some.ipa" \
--sign "iPhone Distribution: Some Company LLC" \
--embed "{somepathto}/Assets/provisioning/com.company.some.enterprise.mobileprovision"
@lottadot
lottadot / gist:4667075
Created January 29, 2013 19:42
Running Unit tests from command line (ie Xcode 4.52/4.6 and Jenkins). We install ios-sim gem, add a buildtarget to run from CLI and this as a run script at on that build target
if ENV['SL_RUN_UNIT_TESTS'] then
#launcher_path = File.join(ENV['SRCROOT'], "Scripts", "ios-sim")
launcher_path = "/usr/local/bin/ios-sim"
test_bundle_path= File.join(ENV['BUILT_PRODUCTS_DIR'], "#{ENV['PRODUCT_NAME']}.#{ENV['WRAPPER_EXTENSION']}")
environment = {
'DYLD_INSERT_LIBRARIES' => "/../../Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection",
@lottadot
lottadot / gist:4998800
Created February 20, 2013 19:52
git-up-dirtree
#!/bin/sh
# Copyright (c) 2012-2013 Lottadot LLC
# License is share and share alike damnit.
# Requires gem `git-up`
echo -e "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
set +e
current_dir=$(pwd)
script_dir=$(dirname $0)
@lottadot
lottadot / gist:5007626
Last active December 14, 2015 01:39
Intern Position Summer 2013 Columbus Ohio
Company: Resource Inc.
Where: Downtown Columbus
On Bus route: Yes
Timeframe: 12 weeks May thru Aug. Fulltime. Paid.
Dress: Very casual
Hours: Flexible
Remote-workable: Yes (some allowed, as needed, we're flexible)
What you may be working on:
Native iOS App(s) (Objective-C)