Skip to content

Instantly share code, notes, and snippets.

import Foundation
public enum CurrencyCode: String, Codable, CaseIterable, Identifiable {
case aed, afn, all, amd, ang, aoa, ars, aud, awg, azn, bam, bbd, bdt, bgn, bhd, bif, bmd, bnd, bob, brl, bsd, btn, bwp, byn, bzd, cad, cdf, chf, clp, cny, cop, crc, cuc, cup, cve, czk, djf, dkk, dop, dzd, egp, ern, etb, eur, fjd, fkp, gbp, gel, ggp, ghs, gip, gmd, gnf, gtq, gyd, hkd, hnl, hrk, htg, huf, idr, ils, imp, inr, iqd, irr, isk, jep, jmd, jod, jpy, kes, kgs, khr, kmf, kpw, krw, kwd, kyd, kzt, lak, lbp, lkr, lrd, lsl, lyd, mad, mdl, mga, mkd, mmk, mnt, mop, mru, mur, mvr, mwk, mxn, myr, mzn, nad, ngn, nio, nok, npr, nzd, omr, pab, pen, pgk, php, pkr, pln, pyg, qar, ron, rsd, rub, rwf, sar, sbd, scr, sdg, sek, sgd, shp, sll, sos, spl, srd, stn, svc, syp, szl, thb, tjs, tmt, tnd, top, `try`, ttd, tvd, twd, tzs, uah, ugx, usd, uyu, uzs, vef, vnd, vuv, wst, xaf, eac, xcd, xdr, xof, xpf, yer, zar, zmw
public var id: Self { self }
public init?(from string: String) {
let lowercaseString =
@pseigo
pseigo / git-tips.md
Last active January 6, 2021 20:12
Git Tips

Git Tips

Rebase changes onto your branch

Explanation

Rebasing is usually used to pull changes from master into your own branch if other commits get merged in after you've branched. If you're working on separate branches (with more than one person), it's a good idea to get comfortable with this process to resolve any merge conflicts that'll occur when you try to merge.

Let's look at an example. Let's say this is the master branch (each 'o' is a commit):

@pseigo
pseigo / add-windows-terminal-to-context-menu.reg
Last active January 12, 2021 06:27
📁 Windows Terminal Context Menu Item
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\ubuntu]
@="Ubuntu Terminal here"
"Icon"="%userprofile%\\AppData\\Local\\WindowsTerminal\\terminal.ico"
[HKEY_CLASSES_ROOT\Directory\Background\shell\ubuntu\command]
@="C:\\Users\\User\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe -d . --profile=\"Ubuntu\""
[HKEY_CLASSES_ROOT\Directory\shell\ubuntu]
@pseigo
pseigo / cloudSettings
Last active February 26, 2022 05:02
Visual Studio Code Settings Sync Gist
{"lastUpload":"2022-02-26T05:02:19.651Z","extensionVersion":"v3.4.3"}
@pseigo
pseigo / irc.md
Last active March 18, 2025 05:17 — forked from xero/irc.md
irc cheat sheet

IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
  • Leaves the specified channel.