I hereby claim:
- I am aral on github.
- I am aral (https://keybase.io/aral) on keybase.
- I have a public key whose fingerprint is FB1B E897 B399 F107 780A B004 B89F B743 1702 6216
To claim this, I am signing this object:
// The docs say that the appearance property of an NSPopover should be set to an | |
// NSPopoverAppearance enum but it actually expects an NSAppearance instance. | |
// e.g., in an NSViewController subclass: | |
let popover = NSPopover() | |
popover.contentViewController = self.storyboard?.instantiateControllerWithIdentifier("someViewController") as? NSViewController | |
popover.appearance = NSAppearance(named: NSAppearanceNameVibrantLight) | |
popover.behavior = NSPopoverBehavior.Transient |
I hereby claim:
To claim this, I am signing this object:
// Unfortunately, this has to be a string right now as IBInspectable enums are not supported at the moment. | |
@IBInspectable var alignmentToParentName:String = "top right" | |
{ | |
didSet | |
{ | |
var name = (alignmentToParentName.lowercaseString as NSString) | |
let top = 0b00, bottom = 0b10, right = 0b00, left = 0b01 | |
var bitmask = 0b0 | |
// The default, even if garbage is entered in Interface Builder, is top right. |
// | |
// NSView+CustomTaggable.swift | |
// | |
// Allows you to set tags in Interface Builder for custom NSViews. | |
// | |
// Usage: | |
// | |
// Your custom view must implement the CustomTaggable protocol. Then, in your custom | |
// NSView, declare the customTag property like this: | |
// |
// | |
// NSView+ChangeAnchorPointWithoutMakingTheLayerJump.swift | |
// | |
// Setting .anchorPoint on a layer makes the layer jump which is most | |
// likely not what you want. This extension fixes that. Useful for Core Animation. | |
// | |
// Usage: (e.g., to set the anchor point to the centre) | |
// | |
// myView.setAnchorPoint(CGPointMake(0.5, 0.5)) | |
// |
Which means that text scale should be 1x when the 4K monitor is plugged in but it should be larger than that (at least ~1.5x) to be legible on the laptop’s screen. (Yes, the manufacturer of the laptop chose the wrong resolution for the screen. It should have been QHD (2560 × 1440) or at most QHD+ (3200×1800) so that you could run it confortably pixel doubled.)
Anyway, it’s not and you’ve already bought it (and it’s otherwise an excellent laptop) but you don’t want to change the text scale every time you plug it into and unplug it from your external monitor.
# Load Antigen | |
# (zsh plugin manager that can install plugins from git repositories) | |
source "/home/aral/antigen.zsh" | |
# Load oh-my-zsh. | |
antigen use oh-my-zsh | |
# Plugins from default repository | |
# (robbyrusell’s oh-my-zsh) | |
antigen bundle git |
bash -lic "wget -O /tmp/magick https://download.imagemagick.org/ImageMagick/download/binaries/magick && chmod +x /tmp/magick && test \$(wget -qO- https://download.imagemagick.org/ImageMagick/download/binaries/digest.rdf | grep 'rdf:about=\"magick\".*' -A6 | sed -rn 's/.*<digest:sha256>(.*?)<\/digest:sha256>/\1/p') = \$(sha256sum /tmp/magick | sed -r 's/(.*)\s(.*)/\1/') && (sudo mv /tmp/magick /usr/local/bin/ && echo 'ImageMagick 7 successfully installed.') || (rm /tmp/magick && echo 'Installation failed. Security error: message digest verification failed for ImageMagick 7 AppImage binary.') |