Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
// ==UserScript== | |
// @name HackerNews GPT-Free Feed | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Hides any Hacker News story with "GPT" in its title. | |
// @author Taylor Troesh | |
// @include https://news.ycombinator.com/* | |
// @grant none | |
// ==/UserScript== |
// | |
// Created by Daniel Tavares on 07/05/2021. | |
// | |
import SwiftUI | |
// MARK: - OptionsSet | |
// Blog post https://dev.to/vibrazy/easy-swiftui-view-bindings-using-optionset-and-sourcery-4edb | |
protocol OptionsBinding {} |
import Combine | |
import CoreData | |
import Foundation | |
class CDPublisher<Entity>: NSObject, NSFetchedResultsControllerDelegate, Publisher where Entity: NSManagedObject { | |
typealias Output = [Entity] | |
typealias Failure = Error | |
private let request: NSFetchRequest<Entity> | |
private let context: NSManagedObjectContext |
import Combine | |
import CoreData | |
public final class FetchedResultsPublisher | |
<ResultType> | |
: Publisher | |
where | |
ResultType: NSFetchRequestResult | |
{ | |
Picking the right architecture = Picking the right battles + Managing trade-offs
// MARK: - UIImage (Base64 Encoding) | |
public enum ImageFormat { | |
case PNG | |
case JPEG(CGFloat) | |
} | |
extension UIImage { | |
public func base64(format: ImageFormat) -> String { |
############################################################################### | |
# Helpful Docker commands and code snippets | |
############################################################################### | |
### CONTAINERS ### | |
docker stop $(docker ps -a -q) #stop ALL containers | |
docker rm -f $(docker ps -a -q) # remove ALL containers | |
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter | |
# exec into container |