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 lldb | |
def __lldb_init_module(debugger, internal_dict): | |
debugger.HandleCommand('command script add -f SwiftPrinter.printer pjson') | |
def printer(debugger, command, result, internal_dict): | |
debugger.HandleCommand('p print(String(data: try! JSONSerialization.data(withJSONObject:' + command + ', options: .prettyPrinted), encoding: .utf8 )!)') |
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
// | |
// Combine+WithLatestFrom.swift | |
// | |
// Created by Shai Mishali on 29/08/2019. | |
// Copyright © 2019 Shai Mishali. All rights reserved. | |
// | |
import Combine | |
// MARK: - Operator methods |
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
struct Cart { | |
private let action = PublishRelay<Action>() | |
public let items: Observable<[Item]> | |
init() { | |
items = action | |
.scan([Item]()) { items, action in | |
switch action { | |
case .add(let item): | |
return items + [item] |
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
#!/sbin/openrc-run | |
description="node_exporter" | |
: ${NODE_PIDFILE:=/var/run/node_exporter.pid} | |
: ${NODE_USER:=root} | |
depend() { | |
need net | |
need localmount |
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
// The MIT License (MIT) | |
// | |
// Copyright (c) 2017 Alexander Grebenyuk (github.com/kean). | |
import Foundation | |
import RxSwift | |
import RxCocoa | |
extension ObservableType { |
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
// | |
// UserDefaults+Codable.swift | |
// Converter UltraLight | |
// | |
// Created by Brent Royal-Gordon on 8/31/17. | |
// Copyright © 2017 Architechies. All rights reserved. | |
// MIT-licensed, go nuts with it. | |
// | |
import Foundation |
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
// | |
// PaginationNetworkLogic.swift | |
// | |
// Created by Daniel Tartaglia on 4/9/17. | |
// Copyright © 2019 Daniel Tartaglia. MIT License | |
// | |
import RxSwift | |
struct PaginationUISource { |
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/sh | |
rm -rf "/Applications/Adobe*" | |
rm -rf "~/Library/Application Support/Adobe/" | |
rm -rf "~/Library/Caches/Adobe*/" | |
sudo rm -rf "/Applications/Utilities/Adobe*" | |
sudo rm -rf "/Library/Application Support/Adobe/" | |
sudo rm -rf "/Users/Shared/Adobe/" |
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 colorWithGradient(frame: CGRect, colors: [UIColor]) -> UIColor { | |
// create the background layer that will hold the gradient | |
let backgroundGradientLayer = CAGradientLayer() | |
backgroundGradientLayer.frame = frame | |
// we create an array of CG colors from out UIColor array | |
let cgColors = colors.map({$0.CGColor}) | |
backgroundGradientLayer.colors = cgColors |