A curated list of arguments that can be used for enabling tools on iOS development.
This file contains hidden or 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
<select> | |
<option value="AL">Alabama</option> | |
<option value="AK">Alaska</option> | |
<option value="AZ">Arizona</option> | |
<option value="AR">Arkansas</option> | |
<option value="CA">California</option> | |
<option value="CO">Colorado</option> | |
<option value="CT">Connecticut</option> | |
<option value="DE">Delaware</option> | |
<option value="DC">District Of Columbia</option> |
This file contains hidden or 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
//: Convenience functions/extension on top of GCD. | |
import Dispatch | |
var MainQueue: dispatch_queue_t { return dispatch_get_main_queue() } | |
func GlobalQueue(qos: dispatch_qos_class_t = .Default) -> dispatch_queue_t | |
{ | |
return dispatch_get_global_queue(qos, 0) | |
} |
This file contains hidden or 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
# Assumptions: | |
# 1. Features follow the name convention => feature/SOME_NEW_FEATURE-1234 | |
# 2. Using Mac Terminal. Have not tested on Linux | |
# Date Format => YYYY-MM-DD | |
git log --merges --format=oneline --since=$start_date --until=$end_date | egrep -po "([A-Z]{2,9}-\d+)$" |
This file contains hidden or 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
/* | |
Reference to default values in css. Thanks to Milche; http://stackoverflow.com/users/845310/milche-patern. | |
Originally found at http://stackoverflow.com/a/15903168/2354492 | |
*/ | |
.reset-this { | |
animation : none; | |
animation-delay : 0; | |
animation-direction : normal; | |
animation-duration : 0; | |
animation-fill-mode : none; |
This file contains hidden or 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
// | |
// NBResponderChainUtilities.h | |
// | |
// Created by Nicolas @ bou.io on 19/04/13. | |
// | |
#import <UIKit/UIKit.h> | |
@interface UIView (NBResponderChainUtilities) | |
- (UIView*) nb_firstResponder; // Recurse into subviews to find one that responds YES to -isFirstResponder |
This file contains hidden or 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 UIKit | |
struct Segment { | |
var start: CGFloat | |
var end: CGFloat | |
} | |
extension Segment { | |
var length: CGFloat { | |
return end - start |
This file contains hidden or 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
# This script sets the application's version based on the latest tag on the master branch. | |
# Additionally, the commit hash is also made available in the Info.plist by the `BuildCommitHash` property. | |
# | |
# Add a new run script step to the build phase in your xcode project | |
# The script should be ran after the bundle resources have been copied | |
echo "Versioning Script Start" | |
export BUILD_HASH="$(git rev-parse --short HEAD)" | |
echo "Commit Hash: ${BUILD_HASH}" | |
export VERSION_NAME="$(git describe HEAD --abbrev=0 --tags | grep -Eo '[0-9]+.[0-9]+.[0-9]+')" |
This file contains hidden or 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 | |
# @desc Auto-increment the version number (only) when a project is archived for export. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Check the checkbox "Run script only when installing" |
This file contains hidden or 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
extension ContiguousArray { | |
var isNotEmpty: Bool { | |
return !self.isEmpty | |
} | |
} | |
extension RandomAccessCollection { | |
var isNotEmpty: Bool { | |
return !self.isEmpty | |
} |
OlderNewer