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
### Keybase proof | |
I hereby claim: | |
* I am litso on github. | |
* I am litso (https://keybase.io/litso) on keybase. | |
* I have a public key ASAS-BE5_2G8lT3amKja5DoDEk3bf2kHCy5VVMkk52cIxgo | |
To claim this, I am signing this object: |
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
protocol Identifiable { | |
var x: String { get } | |
} | |
class Taco: Identifiable { | |
let x: String | |
init() { | |
self.x = "taco" | |
} |
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
# Fastlane extension to increment build number | |
# Designed for build setup where you are manually triggering beta builds from the master branch. | |
# Uses Apple's agvtool to increment and commits the resulting changes. | |
# Necessary because Fastlane's built in action does not commit the result. | |
module Fastlane | |
module Actions | |
module SharedValues | |
INCREMENT_AND_COMMIT_BUILD_NO_CUSTOM_VALUE = :INCREMENT_AND_COMMIT_BUILD_NO_CUSTOM_VALUE | |
end |
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
// Source: http://blog.supertop.co/post/108759935377/app-developer-friends-try-testflight | |
// Here’s a little tip I picked up from Paul Haddad on Twitter. | |
// If you want your app to detect whether it’s running on a TestFlight build, this should do the trick: | |
[[[[NSBundle mainBundle] appStoreReceiptURL] lastPathComponent] isEqualToString:@"sandboxReceipt”] |
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 | |
let determinesValue = true | |
// Problem: I want to assign to `mySize` based on value of `determinesValue` | |
// without nesting e.g. if (determinesValue) { let mySize = ... | |
// Method 1: Use a trigraph | |
// drawbacks: Not good if you need compare multiple values | |
let mySize1 = determinesValue ? 20 : 10 |
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 | |
# | |
### CocoaPods git-checkout hook | |
# | |
# This is a hook which you can install, it will automatically | |
# run `pod install` when you do a git pull/clone/checkout. | |
# | |
# The hook can be used to make CocoaPods usable with Xcode CI. | |
# | |
## Installation |
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
var page = require('webpage').create(); | |
// User-Agent is supported through page.settings | |
page.settings.userAgent = 'Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25'; | |
// This is how you set other header variables | |
page.customHeaders = {'Referer': 'localhost'}; |
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
@mixin box-shadow($top, $left, $blur, $color, $inset: false) { | |
@if $inset { | |
-webkit-box-shadow:inset $top $left $blur $color; | |
-moz-box-shadow:inset $top $left $blur $color; | |
box-shadow:inset $top $left $blur $color; | |
} @else { | |
-webkit-box-shadow: $top $left $blur $color; | |
-moz-box-shadow: $top $left $blur $color; | |
box-shadow: $top $left $blur $color; | |
} |