some tools for diagrams in software documentation
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 UIKit | |
import Security | |
class Keychain { | |
class func save(key: String, data: NSData) -> Bool { | |
let query = [ | |
kSecClass as String : kSecClassGenericPassword as String, | |
kSecAttrAccount as String : key, | |
kSecValueData as String : data ] |
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
// | |
// ConvenientColors.swift | |
// | |
// Created by Clarko on 7/15/20. | |
// | |
// Color.primary and Color.secondary are great for foreground text | |
// that adapts in light & dark mode, but there are a lot more | |
// UI Element Colors in iOS and macOS: | |
// | |
// https://developer.apple.com/documentation/uikit/uicolor/ui_element_colors |
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
language: objective-c | |
xcode_workspace: "<WorkspaceName.xcworkspace>" | |
xcode_scheme: "<SchemaName>" | |
script: xctool -workspace <WorkspaceName.xcworkspace> -scheme <SchemeName> -configuration Release build archive | |
before_script: | |
- ./scripts/travis/add-key.sh | |
after_script: | |
- ./scripts/travis/remove-key.sh | |
after_success: | |
- ./scripts/travis/testflight.sh |
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 GroupersController < ApplicationController::Base | |
def create | |
@grouper = Grouper.new(leader: current_member) | |
if @grouper.save | |
confirm_grouper_via_emails(@grouper) | |
enqueue_bar_assignment(@grouper) | |
redirect_to home_path | |
else |
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 Memoized<A: Equatable, R> { | |
typealias Value = (_ params: A) -> R | |
var callback: Value | |
@XState private var prevParam: A? = nil | |
@XState private var prevValue: R? = nil | |
init(_ callback: @escaping Value) { | |
self.callback = callback | |
} |
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 --login | |
# Cf. http://stackoverflow.com/questions/33041109 | |
# | |
# Xcode 7 (incl. 7.0.1) seems to have a dependency on the system ruby. | |
# xcodebuild is screwed up by using rvm to map to another non-system | |
# ruby†. This script is a fix that allows you call xcodebuild in a | |
# "safe" rvm environment, but will not (AFAIK) affect the "external" | |
# rvm setting. | |
# |
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
<img src="http://img.shields.io/badge/Operator_overload-guilty-red.svg" height="20" alt="Uses operator overloads"/> |