Skip to content

Instantly share code, notes, and snippets.

View timshadel's full-sized avatar

Tim Shadel timshadel

View GitHub Profile

To start using Carthage with a new project:

  1. List your dependencies in a Cartfile. Refer to the Carthage documentation for details.
  2. Run carthage bootstrap --no-build --use-submodules
  3. Create a new workspace.
  4. Drag your existing App project into the workspace.
  5. Drag framework dependency projects from ./Carthage/Checkouts into the workspace.
  6. Go to the General tab of your target properties.
  7. Add framework dependencies to Linked Frameworks and Libraries. They will show up as Workspace frameworks.
  8. Add the same frameworks to Embedded Binaries.
  9. Note, the previous step will probably create duplicates in Linked Frameworks and Libraries. Delete the duplicates.
@martinwinter
martinwinter / MWCGPath.h
Created March 18, 2014 18:49
A thin object wrapper around CGPath, mainly for the purpose of serializing paths. (Not yet converted to ARC, sorry.)
//
// MWCGPath.h
//
// Created by Martin Winter on 14.01.11.
// Copyright 2011 Martin Winter. All rights reserved.
//
// Provides an NSObject wrapper around CGPathRef.
//
#if TARGET_OS_IPHONE
@davidjrice
davidjrice / .travis.yml
Last active October 23, 2019 16:17 — forked from johanneswuerbach/.travis.yml
Travis CI + TestFlight integration (updated for Travis' new Mac VM setup / xctool)
language: objective-c
xcode_workspace: "<WorkspaceName.xcworkspace>"
xcode_scheme: "<SchemaName>"
script: xctool -workspace <WorkspaceName.xcworkspace> -scheme <SchemeName> -configuration Release build archive
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
@jhankin
jhankin / SOInsetLabel.h
Created November 5, 2012 19:11
UILabel subclass encapsulating interior shadow functionality
//
// SOInsetLabel.h
//
// Created by Joseph Hankin on 11/2/12.
// From code posted by Rob Mayoff.
// http://stackoverflow.com/questions/8467141/ios-how-to-achieve-emboss-effect-for-the-text-on-uilabel
// Copyright (c) 2012 Joseph Hankin. All rights reserved.
//
@andrewsardone
andrewsardone / gist:3889904
Last active January 31, 2020 17:07
A quick cheat sheet for using CocoaPods

CocoaPods project setup

Create a Podfile at the root of your project

platform :ios, '5.0'

pod 'AFNetworking'
pod 'OHAttributedLabel'
@xslim
xslim / AppDelegate.m
Created October 8, 2012 22:41
AFIncrementalStore with If-Modified-Since hack
// Connecting AFIncrementalStore & MagicRecord
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
PDDebugger *debugger = [PDDebugger defaultInstance];
[debugger connectToURL:[NSURL URLWithString:@"ws://localhost:9000/device"]];
[debugger enableNetworkTrafficDebugging];
[debugger forwardAllNetworkTraffic];
[debugger enableCoreDataDebugging];
@mike3k
mike3k / chk_enrypt.c
Created June 19, 2012 20:15
Check for encrypted iOS binary
#import <dlfcn.h>
#import <mach-o/loader.h>
/* The encryption info struct and constants are missing from the iPhoneSimulator SDK, but not from the iPhoneOS or
* Mac OS X SDKs. Since one doesn't ever ship a Simulator binary, we'll just provide the definitions here. */
#if TARGET_IPHONE_SIMULATOR && !defined(LC_ENCRYPTION_INFO)
#define LC_ENCRYPTION_INFO 0x21
struct encryption_info_command {
@entaroadun
entaroadun / gist:1653794
Created January 21, 2012 20:10
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation:

@stepheneb
stepheneb / jdk7u-osx-errors.sh
Created December 28, 2011 05:28
error building jdk7u-osx
hg clone http://hg.openjdk.java.net/jdk7u/jdk7u-osx
cd jdk7u-osx
hg fpull -u
unset LC_ALL LANG CLASSPATH JAVA_HOME LD_LIBRARY_PATH; make ALLOW_DOWNLOADS=true SA_APPLE_BOOT_JAVA=true ALWAYS_PASS_TEST_GAMMA=true ALT_BOOTDIR=`/usr/libexec/java_home -v 1.6`
# ...
# Running javac:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput -Djava.awt.headless=true -Xmx512m -Xms512m -XX:PermSize=32m -XX:MaxPermSize=160m -Xbootclasspath/p:/Users/stephen/dev/java/src/jdk7u-osx/build/macosx-amd64/langtools/dist/bootstrap/lib/javac.jar -jar /Users/stephen/dev/java/src/jdk7u-osx/build/macosx-amd64/langtools/dist/bootstrap/lib/javac.jar -source 7 -target 7 -encoding ascii -Xbootclasspath:/Users/stephen/dev/java/src/jdk7u-osx/build/macosx-amd64/classes -sourcepath /Users/stephen/dev/java/src/jdk7u-osx/build/macosx-amd64/gensrc:::/Users/stephen/dev/java/src/jdk7u-osx/jdk/src/macosx/classes:/Users/stephen/dev/java/src/jdk7u-osx/jdk/src/solar