I hereby claim:
- I am zoontek on github.
- I am zoontek (https://keybase.io/zoontek) on keybase.
- I have a public key ASAap_lL6Nf_OF1ZJQwaweIV1PFKNLtNkh3qlp6RlR9d0go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
type ReturnType<F> = F extends (...args: any[]) => infer R ? R : any; | |
type MemoizeResolver<F extends (...args: any[]) => any> = ( | |
...args: Parameters<F> | |
) => string; | |
type MemoizedFuntion<F extends (...args: any[]) => any> = (( | |
...args: Parameters<F> | |
) => ReturnType<F>) & { |
type Key = string | number | symbol; | |
type ExhaustiveMatch<K extends Key, T> = Record<K, T>; | |
type PartialMatch<K extends Key, T> = Partial<Record<K, T>> & { _: T }; | |
export const match = <T, K extends Key = Key>( | |
key: K, | |
map: ExhaustiveMatch<K, T> | PartialMatch<K, T>, | |
): T => (map.hasOwnProperty(key) ? map[key] : (map as PartialMatch<K, T>)._) as T; |
// Libs internal | |
type Segment<T> = { | |
test: (value: unknown) => boolean; | |
parse: (string: string) => T; | |
stringify: (value: T) => string; | |
}; | |
const string: Segment<string> = { | |
test: (value) => typeof value === "string", |
import frenchkiss, { TranslationParams } from "frenchkiss"; | |
const en = { | |
"button.hello": "Hello", | |
}; | |
type TranslationKey = keyof typeof en; | |
const fr: { [key in TranslationKey]: string } = { |
import { useSyncExternalStore } from "react"; | |
export type Atom<Value> = { | |
get: () => Value; | |
set: (value: Value | ((prevValue: Value) => Value)) => void; | |
subscribe: (callback: (value: Value) => void) => () => void; | |
reset: () => void; | |
}; | |
export const atom = <Value>(initialValue: Value): Atom<Value> => { |
$ brew install gnupg | |
$ brew install pinentry-mac | |
$ echo "pinentry-program $(which pinentry-mac)" >> ~/.gnupg/gpg-agent.conf | |
$ killall gpg-agent |
Last updated March 13, 2024
This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.
Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.
For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.