3 steps:
- Create multi ssh key
- Add config key
- Change host to using the right key
ssh-keygen -t rsa -f ~/.ssh/key1 -C “[email protected]"
ssh-keygen -t rsa -f ~/.ssh/key2 -C "[email protected]"
// | |
// Switch.swift | |
// Re-Engineering UISwitch | |
// | |
// Created by Nathan Tannar on 15/12/18. | |
// Copyright © 2018 Nathan Tannar. All rights reserved. | |
// | |
import UIKit |
private var shadowLayer: CAShapeLayer! | |
private var cornerRadius: CGFloat = 25.0 | |
private var fillColor: UIColor = .blue // the color applied to the shadowLayer, rather than the view's backgroundColor | |
override func layoutSubviews() { | |
super.layoutSubviews() | |
if shadowLayer == nil { | |
shadowLayer = CAShapeLayer() | |
shadowLayer.path = UIBezierPath(roundedRect: bounds, cornerRadius: cornerRadius).cgPath | |
shadowLayer.fillColor = fillColor.cgColor |
/* | |
Example of how to create a view that has rounded corners and a shadow. | |
These cannot be on the same layer because setting the corner radius requires masksToBounds = true. | |
When it's true, the shadow is clipped. | |
It's possible to add sublayers and set their path with a UIBezierPath(roundedRect...), but this becomes difficult when using AutoLayout. | |
Instead, we a containerView for the cornerRadius and the current view for the shadow. | |
All subviews should just be added and constrained to the containerView | |
*/ | |
import UIKit |
3 steps:
ssh-keygen -t rsa -f ~/.ssh/key1 -C “[email protected]"
ssh-keygen -t rsa -f ~/.ssh/key2 -C "[email protected]"
# ===|| BEGIN EXPORT ||=== | |
export PATH=/usr/local/bin:$PATH | |
export ANDROID_NDK="/Users/`whoami`/Library/Android/sdk/ndk-bundle" | |
export PATH="$HOME/Library/Android/sdk/tools:$PATH" | |
export PATH="$HOME/Library/Android/sdk/platform-tools:$PATH" | |
export LC_ALL=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
# ===|| END EXPORT ||=== |
[core] | |
excludesfile = /Users/`whoami`/.gitignore_global | |
[difftool "sourcetree"] | |
cmd = opendiff \"$LOCAL\" \"$REMOTE\" | |
path = | |
[mergetool "sourcetree"] | |
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" | |
trustExitCode = true | |
[user] | |
email = [email protected] |
import Foundation | |
struct MyStruct: Codable { | |
let name: String | |
let isActive: Bool | |
} | |
extension UserDefaults { | |
private struct Keys { |