$ wget https://github.com/FiloSottile/age/releases/download/v1.0.0-beta2/age-v1.0.0-beta2-linux-amd64.tar.gz
$ tar -xzvf age-v1.0.0-beta2-linux-amd64.tar.gz
$ sudo cp age/* /usr/local/bin/$ age-keygen -o ~/.age/(date +%s)-(hostname).keyHave you ever tried to merge two branches only to end up in conflict hell? You fix a bunch of conflicts only to run git merge --continue and be presented with the same conflicts. Repeat this process and after a few iterations you give up because it just isn't worth the pain and effort.
Would you be surprised to know that there is a git feature specifically for this problem? It's called rerere and I'm going to enrich your life with it now. (I'm going to talk specifically about merging but I think it also helps rebasing)
rerere stands for Reuse Recorded Resolution. The TL;DR version is you ask git to remember how you've resolved hunks in the past, and if the same one comes up for a file in future just redo what you did last time.
To enable this feature just run this lovely command git config --global rerere.enabled true. You can also turn it on by creating this directory in your projects .git/rr-cache, although the global setting is much clearer.
I'll try to take you through an example of how th
| // -- Usage | |
| struct Content: View { | |
| @State var open = false | |
| @State var popoverSize = CGSize(width: 300, height: 300) | |
| var body: some View { | |
| WithPopover( | |
| showPopover: $open, | |
| popoverSize: popoverSize, |
| // | |
| // TaggerView.swift | |
| // | |
| // Created by Alex Hay on 21/11/2020. | |
| // | |
| // Simple interface for adding tags to an array in SwiftUI | |
| // Example video: https://imgur.com/gallery/CcA1IXp | |
| // alignmentGuide code from Asperi @ https://stackoverflow.com/a/58876712/11685049 | |
| import SwiftUI |
| ACTION=install | |
| ADDITIONAL_SDKS= | |
| AD_HOC_CODE_SIGNING_ALLOWED=YES | |
| ALL_OTHER_LDFLAGS=' ' | |
| ALL_OTHER_LIBTOOLFLAGS=' ' | |
| ALTERNATE_GROUP=staff | |
| ALTERNATE_LINKER= | |
| ALTERNATE_MODE=u+w,go-w,a+rX | |
| ALTERNATE_OWNER=username | |
| ALTERNATE_PERMISSIONS_FILES= |
| // Excerpt from https://github.com/krzyzanowskim/CoreTextWorkshop | |
| // Licence BSD-2 clause | |
| // Marcin Krzyzanowski marcin@krzyzanowskim.com | |
| func getSizeThatFits(_ attributedString: NSAttributedString, maxWidth: CGFloat) -> CGSize { | |
| let framesetter = CTFramesetterCreateWithAttributedString(attributedString) | |
| let rectPath = CGRect(origin: .zero, size: CGSize(width: maxWidth, height: 50000)) | |
| let ctFrame = CTFramesetterCreateFrame(framesetter, CFRange(), CGPath(rect: rectPath, transform: nil), nil) |
| import AVKit | |
| import Foundation | |
| class VideoHelper { | |
| static func getThumbnail(from player: AVPlayer, at time: CMTime, maximumSize: CGSize? = nil) -> CGImage? { | |
| guard let currentItem = player.currentItem else { return nil } | |
| return getThumbnail(from: currentItem.asset, at: time, maximumSize: maximumSize) | |
| } |
| import Photos | |
| struct UnexpectedNilError: Error {} | |
| extension PHImageManager { | |
| func requestImage( | |
| for asset: PHAsset, | |
| targetSize: CGSize, | |
| contentMode: PHImageContentMode, | |
| options: PHImageRequestOptions? |