Skip to content

Instantly share code, notes, and snippets.

@rsfinn
rsfinn / keys.app.message.txt
Created August 6, 2020 21:35
Signed message for Keys.app
View keys.app.message.txt
BEGIN MESSAGE.
ErEsKyzYuiDYIbG 0TwoslKXxHuloh4 CXhfiYIDWqPjQOW bNSbB0puvcOgdlv
2hNL39HZ3gIH1gH L5BFil8mMKvTCKq 6Xr2MZHgg4bipof 9UDwrvAzLN2QCP7
alJiwB7LfS1yMFy yEFh0CCSttNwW7t XWJtHWamyA9f300 fT4Fb9CRpr7HBlq
yuOYuxbhPNLuDrt SZN6FD4elS1dt67 R8rRq21.
END MESSAGE.
@rsfinn
rsfinn / capnp.rb
Last active February 6, 2019 20:21
capnp@0.6.1, updated for current Homebrew (removed references to cxx11)
View capnp.rb
class Capnp < Formula
desc "Data interchange format and capability-based RPC system"
homepage "https://capnproto.org/"
url "https://capnproto.org/capnproto-c++-0.6.1.tar.gz"
sha256 "8082040cd8c3b93c0e4fc72f2799990c72fdcf21c2b5ecdae6611482a14f1a04"
bottle do
cellar :any_skip_relocation
sha256 "fe035ee20666f60bea72a033625e30981da7cf49bca28e3ded78daeb9a0cc9f3" => :sierra
sha256 "5ef99277556769e117350e4c4c625c4498aab44aec043c24a3e8596ee98a311a" => :el_capitan
@rsfinn
rsfinn / String+SeparatedIntoLines.swift
Created November 21, 2016 17:52
Swift 3 `String` extension to convert text file contents to lines, even if file is DOS format
View String+SeparatedIntoLines.swift
extension String {
func separatedIntoLines() -> [String] {
var lines: [String] = []
let wholeString = self.startIndex..<self.endIndex
self.enumerateSubstrings(in: wholeString, options: .byLines) {
(substring, range, enclosingRange, stopPointer) in
if let line = substring {
lines.append(line)
}
}
@rsfinn
rsfinn / notes-on-nspopover.txt
Last active April 9, 2016 23:48
Notes on NSPopover (from Chromium bug report)
View notes-on-nspopover.txt
From <https://bugs.chromium.org/p/chromium/issues/detail?id=116179#c14>:
In 10.8, -[NSWindow _sharesParentKeyState] has changed meaning to also include when a window has resigned key state
(which makes sense). This means that the parent window of the bubble (the BrowserWindowController's window) has to
resign key in order for the bubble to lose key via -[NSWindow _changeKeyAndMainLimitedOK:]. Note that there's also
a method -[NSWindow(NSWindowSharedFirstResponder) _setSharesParentFirstResponder:], which may or may not do the same
thing as overriding |-_sharesParentKeyState|, but the former is how popovers get this behavior.
Popovers get closed when key state changes in three ways, set up in _NSPopoverRegisterForEvents. The first is an event
tap via +[NSEvent addGlobalMonitorForEventsMatchingMask:handler:] that watches on (NSLeftMouseDownMask | NSLeftMouseUpMask)
View keybase.md

Keybase proof

I hereby claim:

  • I am rsfinn on github.
  • I am rsfinn (https://keybase.io/rsfinn) on keybase.
  • I have a public key whose fingerprint is 6A4E 638D E670 CA8D C21F 202F 92E3 E5FA 619A CAEF

To claim this, I am signing this object:

@rsfinn
rsfinn / create-mavericks-installer.sh
Created October 4, 2013 16:48
Create Mavericks installation volume (e.g. on USB stick)
View create-mavericks-installer.sh
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction