fragment
["!", "$", "&", "\'", "(", ")", "*", "+", ",", "-", ".", "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", ";", "=", "?", "@", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "~"]
host
["!", "$", "&", "\'", "(", ")", "*", "+", ",", "-", ".", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", ";", "=", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "[", "]", "_", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "~"]
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
{ | |
"ABCD": 3.234E9, | |
"DEFG": 1.232 | |
} |
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
#!/bin/bash | |
# https://stackoverflow.com/a/51343786 | |
# https://developer.apple.com/library/archive/qa/qa1686/_index.html | |
RED='\033[0;31m' # Red | |
GREEN='\033[0;32m' # Green | |
RESET='\033[0m' # Text Reset | |
function __system { | |
echo -e $GREEN$*$RESET |
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
extension ObservableType { | |
/** | |
Returns an observable sequence that contains only distinct contiguous elements in a virtual group by key. | |
For example, | |
Original stream: | |
(A, 1), (A, 2), (B, 100), (A, 2), (A, 2), (B, 101), (A, 3) | |
distinctUntilChanged |
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
extension Reactive where Base: UIScrollView { | |
var loadMore: Observable<Void> { | |
return contentOffset | |
.map({ [weak base] (offset) in | |
guard let scrollView = base else { return false } | |
return offset.y + scrollView.bounds.size.height - scrollView.adjustedContentInset.bottom >= scrollView.contentSize.height | |
}) | |
.distinctUntilChanged() | |
.filter({ $0 }) | |
.mapTo(Void()) |
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
private_lane :match_and_disable_automatic_code_signing do |options| | |
# https://github.com/fastlane/fastlane/issues/1187#issuecomment-174074360 | |
bundle_identifier = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier) | |
match(options) | |
provisioning_map = lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING] | |
automatic_code_signing( | |
use_automatic_signing: false, |
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
class ContentSizeView: UIView { | |
override var intrinsicContentSize: CGSize { | |
return contentSize ?? CGSize(width: UIView.noIntrinsicMetric, height: UIView.noIntrinsicMetric) | |
} | |
var contentSize: CGSize? { | |
didSet { | |
invalidateIntrinsicContentSize() | |
} | |
} |
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 python3 | |
import sys | |
import os | |
import fileinput | |
from collections import Counter | |
def main(): | |
n = None | |
if len(sys.argv) > 1: |
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
# Fire alarm!! | |
alias save='git commit -a -m "saved `date`"' |
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
extension Array: ObserverType where Element: ObserverType { | |
public typealias E = Element.E | |
public func on(_ event: Event<E>) { | |
forEach { (element) in | |
element.on(event) | |
} | |
} | |
} |
NewerOlder