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
| # iOS | |
| app_identifier "com.myapp.app" # The bundle identifier of your app | |
| apple_id "[email protected]" # Your Apple email address | |
| team_id "1234ABCD" # Developer Portal Team ID | |
| # Android | |
| json_key_file "./google-play-api-secret.json" # Path to the json secret file - Follow https://github.com/fastlane/supply#setup to get one | |
| package_name "com.myapp.app" # Your Android app package |
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
| node { | |
| echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
| echo 'No quotes, pipeline command in single quotes' | |
| sh 'echo $BUILD_NUMBER' // 1 | |
| echo 'Double quotes are silently dropped' | |
| sh 'echo "$BUILD_NUMBER"' // 1 | |
| echo 'Even escaped with a single backslash they are dropped' | |
| sh 'echo \"$BUILD_NUMBER\"' // 1 | |
| echo 'Using two backslashes, the quotes are preserved' | |
| sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
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
| // | |
| // An Observer class intended to show how KVO works on operations and queues | |
| // | |
| // Created by Barbara Rodeker on 3/3/16. | |
| // | |
| // This program is free software: you can redistribute it and/or modify | |
| // it under the terms of the GNU General Public License as published by | |
| // the Free Software Foundation, either version 3 of the License, or | |
| // (at your option) any later version. | |
| // |
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 | |
| #!/bin/bash | |
| # | |
| # ssh into a machine and automatically set the background | |
| # color of Mac OS X Terminal depending on the hostname. | |
| # | |
| # Installation: | |
| # 1. Save this script to /usr/local/bin/ssh-host-color | |
| # 2. chmod 755 /usr/local/bin/ssh-host-color | |
| # 3. alias ssh=/usr/local/bin/ssh-host-color |
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 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 | |
| // A swift protocol can apply to a class, struct, or enum, | |
| // but only a reference type can be stored in a `weak` var, | |
| // so a weak var cannot be of a typical protocol type. | |
| protocol MyProcotol { | |
| } |
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
| /* | |
| For this Gist, we have two sides: sender and receiver. The same user can be a sender and a receiver, but I will separate this | |
| two roles to be more clear. | |
| This gist assumes thatyou already have a MCSession created, and the peers are connected, | |
| */ | |
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
| /** @jsx React.DOM **/ | |
| <div> | |
| <FormattedMessage | |
| message={getIntlMessage('post.meta')} | |
| num={props.post.comments.length} | |
| ago={<FormattedRelative value={props.post.date} />} | |
| /> | |
| <span>{random}</span> | |
| </div> |
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
| public enum NotificationKey: String { | |
| case UserSignedIn = "UserSignedInNotification" | |
| case UserSignedOut = "UserSignedOutNotification" | |
| case SomeOtherEvent = "SomeOtherEventNotification" | |
| } | |
| extension NSNotificationCenter { | |
| func addObserver(observer: AnyObject, selector aSelector: Selector, key aKey: NotificationKey) { | |
| self.addObserver(observer, selector: aSelector, name: aKey.rawValue, object: nil) |