Probably one of the easiest things you'll ever do with gpg
Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH
First get the public key
keybase pgp export | gpg --import
Next get the private key
| struct LazyView<Content: View>: View { | |
| let build: () -> Content | |
| init(_ build: @autoclosure @escaping () -> Content) { | |
| self.build = build | |
| } | |
| var body: Content { | |
| build() | |
| } | |
| } |
| # A Best in Class Checklist | |
| A boiled down checklist adapted from this [post](https://www.swiftjectivec.com/a-best-in-class-app/), created by @jordanmorgan10. | |
| > To use this, create a Github Issue in your own repo, and simply copy and paste this text. | |
| ## iOS Core Technology | |
| _Things any iOS app can benefit from_ | |
| - [ ] iCloud Sync | |
| - [ ] [Core Spotlight integration](https://github.com/DreamingInBinary/Spend-Stack/issues/120) |
| #!/usr/bin/env ruby | |
| print "What is the URL of your Apple Downloads resource?\nURL:" | |
| url = gets.strip | |
| print "What is the ADCDownloadAuth cookie token:\nADCDownloadAuth: " | |
| token = gets.strip | |
| command = "aria2c --header \"Host: adcdownload.apple.com\" --header \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\" --header \"Upgrade-Insecure-Requests: 1\" --header \"Cookie: ADCDownloadAuth=#{token}\" --header \"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0 Mobile/14B72 Safari/602.1\" --header \"Accept-Language: en-us\" -x 16 -s 16 #{url} -d ~/Downloads" |
| // | |
| // ExtensionURLRequest.swift | |
| // | |
| // Created by Abhishek Maurya on 16/07/20. | |
| // Copyright © 2020. All rights reserved. | |
| // | |
| import Foundation | |
| extension URLRequest { |
| private func with<T: NSView>(_ value: T, _ builder: (T) -> Void) { | |
| builder(value) | |
| } | |
| private func with<T: NSView>(_ value: T, _ builder: (T) throws -> Void) rethrows { | |
| try builder(value) | |
| } | |
| // Use | |
| with(self.collectionView) { |
Probably one of the easiest things you'll ever do with gpg
Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH
First get the public key
keybase pgp export | gpg --import
Next get the private key
| #!/bin/bash | |
| #Whenever you clone a repo, you do not clone all of its branches by default. | |
| #If you wish to do so, use the following script: | |
| for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master | grep -v main `; do | |
| git branch --track ${branch#remotes/origin/} $branch | |
| done |
Principles of Adult Behavior
| public struct TextSize { | |
| fileprivate struct CacheEntry: Hashable { | |
| let text: String | |
| let font: UIFont | |
| let width: CGFloat | |
| let insets: UIEdgeInsets | |
| fileprivate var hashValue: Int { | |
| return text.hashValue ^ Int(width) ^ Int(insets.top) ^ Int(insets.left) ^ Int(insets.bottom) ^ Int(insets.right) |
| Ordinarily I would go into Keyboard Preferences, Modifier Keys; I would select the name of the external keyboard | |
| and I would tell it to turn Command into Option, Option into Command, and Caps Lock into Control. | |
| But the Varmilo VB87M Mechanical Bluetooth Tenkeyless doesn't show up as an external keyboard. Weird, right? | |
| You can't just swap command and option globally or your local keyboard will be affected. | |
| When I added it, I had to "add Bluetooth device" under Bluetooth preferences, | |
| rather than "add Bluetooth keyboard" under Keyboard preferences. | |
| (That was true, at least, as of 2016-08-24, on OS X El Capital 10.11.6.) |