This article is now published on my website: A one-off git repo server.
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
#!/usr/bin/env sh | |
# Carthage build dirs per platform | |
CARTHAGE_IOS_BUILD_DIR="Carthage/Build/iOS" | |
CARTHAGE_MAC_BUILD_DIR="Carthage/Build/Mac" | |
if [ "$PLATFORM_NAME" = "iphoneos" -o "$PLATFORM_NAME" = "iphonesimulator" ]; then | |
CARTHAGE_BUILD_DIR="$CARTHAGE_IOS_BUILD_DIR" | |
elif [ "$PLATFORM_NAME" = "macosx" ]; then | |
CARTHAGE_BUILD_DIR="$CARTHAGE_MAC_BUILD_DIR" |
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
// swift 1.2 | |
/** | |
:param: old array of items | |
:param: new array of items | |
:return: a tuple where with the following components: | |
- `newIndexesAdded` indexes in new, for elements that did not exist in old | |
- `oldIndexesDeleted` indexes in old, for elements not in new |
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
@implementation UIViewController (BHSContainment) | |
- (void)bhs_addChildViewController:(UIViewController *)child { | |
[self bhs_addChildViewController:child superview:self.view]; | |
} | |
// Note this potentially forces view loads on both parent and child | |
// Not a problem if used in -viewDidLoad or later | |
// Use superview parameter with care. If it's not within the parent VC's hierarchy, you deserve to lose |
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
/******************************** | |
* UPDATE: I have crated a plugin to do this: https://github.com/jboesch/jQuery-fullCalendar-iPad-drag-drop/ | |
*********************************/ | |
/*These are the brief steps that it takes to get fullCalendar (http://arshaw.com/fullcalendar/) up and running with drag/drop support on the iPad. This assumes you already have fullCalendar setup.*/ | |
//1. Include a copy of jQuery touch punch in your project, you can find it here: https://github.com/furf/jquery-ui-touch-punch | |
//2. Go into jquery-touch-punch.js and right after this line (around line 57 - mouseProto._mouseDown = function (event) {) add this: this._mouseDownEvent = event; | |
//3. Add this function somewhere in your global.js file or wherever you want: |