Skip to content

Instantly share code, notes, and snippets.

View plam4u's full-sized avatar
🏠
Working from home

Plamen Andreev plam4u

🏠
Working from home
View GitHub Profile
@plam4u
plam4u / CustomKeyCodable.swift
Created February 25, 2021 16:24 — forked from IanKeen/CustomKeyCodable.swift
PropertyWrapper: CustomKeyCodable allows defining the keys for decoding _per property_
protocol CustomKeyCodable: Codable {
init()
}
extension CustomKeyCodable {
init(from decoder: Decoder) throws {
self.init()
let container = try decoder.container(keyedBy: AnyCodingKey.self)
let mirror = Mirror(reflecting: self)

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@plam4u
plam4u / Backup-and-Restore-GPG-and-SSH-keys.md
Created May 5, 2024 19:41 — forked from colematt/Backup-and-Restore-GPG-and-SSH-keys.md
[Backup and Restore GPG and SSH keys] #git #gpg #ssh

Backup

  1. Copy both id_rsa and id_rsa.pub from ~/.ssh/ to a USB drive. Identify the private key by executing the following command.
    gpg --list-secret-keys --keyid-format LONG
    
  2. It will show something similar to this.
    sec   4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10]