Skip to content

Instantly share code, notes, and snippets.

View nomyfan's full-sized avatar
🍵
得閑飲茶

Kim Chan nomyfan

🍵
得閑飲茶
View GitHub Profile
@thesamesam
thesamesam / xz-backdoor.md
Last active May 22, 2024 08:49
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@nomyfan
nomyfan / calculator.ts
Last active April 29, 2023 09:14
Calculate a image size to fit different platforms
type Width = number;
type Height = number;
type AspectRatio = [Width, Height];
type LowerUpperBounds = [number, number];
function unreachable(): never {
throw new Error("unreachable!");
}
function calculate(width: number, height: number, options: { ratioRange: LowerUpperBounds }): AspectRatio {
@sts10
sts10 / rust-command-line-utilities.markdown
Last active May 20, 2024 15:46
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@krisleech
krisleech / renew-gpgkey.md
Last active May 20, 2024 08:24
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date: