Skip to content

Instantly share code, notes, and snippets.

Avatar

Nathan Mattes zeitschlag

View GitHub Profile
@zeitschlag
zeitschlag / AsyncOperation.swift
Created Mar 12, 2020
This is the AsyncOperation-class from the blogpost: https://zeitschlag.net/asyncoperation/
View AsyncOperation.swift
import Foundation
class AsyncOperation: Operation {
private var asyncOperationFinished: Bool
private var asyncOperationExecuting: Bool
override init() {
self.asyncOperationFinished = false
self.asyncOperationExecuting = false
@zeitschlag
zeitschlag / redmine.css
Created Feb 22, 2019
Basic BBEdit-Preview CSS for Preview
View redmine.css
/* 1. Store this in ~Library/Application Support/BBEdit/Preview CSS/redmine.css */
/* 2. Open a textile-file */
/* 3. Ctrl+CMD+P */
/* 4. Select redmine.css in Preview as CSS */
/* 5. There's no 5. */
body {
font-family: Verdana, sans-serif;
color: #333;
font-size: 12px;
View TableViewController.swift
import UIKit
class TableViewController: UITableViewController {
var elements : [String] = ["A", "B", "C"]
override func viewDidLoad() {
super.viewDidLoad()
NotificationCenter.default.addObserver(self, selector: #selector(TableViewController.showAlert(_:)), name:NSNotification.Name(rawValue: "showAlert"), object: nil)
}