View GPG and git on macOS.md

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
View keybase.md

Keybase proof

I hereby claim:

  • I am danieleggert on github.
  • I am danielboedewadt (https://keybase.io/danielboedewadt) on keybase.
  • I have a public key whose fingerprint is A529 F8B6 3037 F7F8 AA11 0849 FA00 7047 A6B1 67E1

To claim this, I am signing this object:

View main.c
//
// main.c
// pausehandle
//
// Created by Daniel Eggert on 12/04/16.
//
// Run an HTTP server like so:
// % echo "Hello" > hello.txt
// % python -m SimpleHTTPServer
// The code expects to be able to get a text file at
View KeyValueObserver.swift
import Foundation
/// A type-safe Key-Value-Observer (KVO).
///
/// Extend the class to be observed to implement `KeyCodable`, e.g.
/// ```
/// extension WKWebView: KeyCodable {
/// enum Key: String {
View NSData+hexadecimal.swift
import Foundation
extension NSData {
var hexadecimalString: String {
var result = ""
enumerateByteRangesUsingBlock { (pointer, range, _) in
let pointerToBytes = UnsafePointer<UInt8>(pointer)
let bytes = UnsafeBufferPointer(start: pointerToBytes, count: range.length)
for v in bytes {
result.appendContentsOf(String(format:"%02x", v))
View teardown.m
@implementation Foo
{
BOOL _needsTearDown;
}
- (instancetype)init;
{
self = [super init];
if (self) {
_needsTearDown = YES;
View download-email.eml
Delivered-To: daniel+test@helloclue.com
Received: by 10.220.201.70 with SMTP id ez6csp10837vcb;
Wed, 6 Feb 2013 02:50:28 -0800 (PST)
X-Received: by 10.101.40.2 with SMTP id s2mr9987477anj.88.1360147827848;
Wed, 06 Feb 2013 02:50:27 -0800 (PST)
Return-Path: <bounce-md_15131679.51123572.v1-2a00d47e46b0457fb24993692ada811c@mail263.us4.mandrillapp.com>
Received: from mail263.us4.mandrillapp.com (mail263.us4.mandrillapp.com. [205.201.137.7])
by mx.google.com with ESMTP id n67si25089644yhk.66.2013.02.06.02.50.27;
Wed, 06 Feb 2013 02:50:27 -0800 (PST)
Received-SPF: pass (google.com: domain of bounce-md_15131679.51123572.v1-2a00d47e46b0457fb24993692ada811c@mail263.us4.mandrillapp.com designates 205.201.137.7 as permitted sender) client-ip=205.201.137.7;