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
lane :retrieve_fastlane_session do | |
# runs shell | |
# this needs SPACESHIP_SKIP_2FA_UPGRADE=1 flag | |
spaceauth_output = `bundle exec fastlane spaceauth` | |
# regex the output for the value we need | |
fastlane_session_regex = %r{Pass the following via the FASTLANE_SESSION environment variable:\n(?<session>.+)\n\n\nExample:\n.+} | |
new_session = nil | |
if match = spaceauth_output.match(fastlane_session_regex) | |
# strip out the fancy formatting |
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
ssh -i path/to/your/key.pem ubuntu@ec2–19–124–171–90.eu-central-1.compute.amazonaws.com |
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
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
/* ... */ | |
NotificationCenter.default.addObserver(self, | |
selector: #selector(AppDelegate.applicationDidTimeout(notification:)), | |
name: .appTimeout, | |
object: nil | |
) | |
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
func applicationDidTimeout(notification: NSNotification) { | |
print("application did timeout, perform actions") | |
} |
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
import UIKit | |
UIApplicationMain( | |
CommandLine.argc, | |
UnsafeMutableRawPointer(CommandLine.unsafeArgv) | |
.bindMemory( | |
to: UnsafeMutablePointer<Int8>.self, | |
capacity: Int(CommandLine.argc)), | |
NSStringFromClass(TimerApplication.self), | |
NSStringFromClass(AppDelegate.self) |
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
import Foundation | |
extension Notification.Name { | |
static let appTimeout = Notification.Name("appTimeout") | |
} |
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
import UIKit | |
class TimerApplication: UIApplication { | |
// the timeout in seconds, after which should perform custom actions | |
// such as disconnecting the user | |
private var timeoutInSeconds: TimeInterval { | |
// 2 minutes | |
return 2 * 60 | |
} |
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
python my-script.py |
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
import coremltools | |
caffe_model = ('oxford102.caffemodel', 'deploy.prototxt') | |
labels = 'list.txt' | |
coreml_model = coremltools.converters.caffe.convert( | |
caffe_model, | |
class_labels=labels, | |
image_input_names='data' |
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
pink primrose | |
hard-leaved pocket orchid | |
canterbury bells | |
sweet pea | |
english marigold | |
tiger lily | |
moon orchid | |
bird of paradise | |
monkshood | |
globe thistle |
NewerOlder