Skip to content

Instantly share code, notes, and snippets.

View CourteousCoder's full-sized avatar

Chloe Shetreet CourteousCoder

View GitHub Profile
@CourteousCoder
CourteousCoder / jsonc-comments-devbox.jsonc
Created May 31, 2025 09:11
Demo syntax highlighting on Github
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.14.2/.schema/devbox.schema.json",
"packages": [],
"shell": {
"init_hook": [
/* Here we have some JSONC comments
* We this file has a .jsonc extension which github seems to recognize as JSON without issue.
*/
// Here's a single-line comment
"echo 'Welcome to devbox!' > /dev/null"
@CourteousCoder
CourteousCoder / fork_you.md
Created October 28, 2024 23:29
"Fork You" - An Open Source Parody

Fork You (parody of Cee Lo Green’ “Forget You”)

Suggested edits are welcome! You're welcome to fork this too.

Fair use disclaimer at the end of this file.

Chorus

I see you browsin' round Github at the repo I love
And I'm like, "Fork you" (Ooh-ooh-ooh)
I guess the change in this version wasn't enough \

@CourteousCoder
CourteousCoder / zplug-patch.zsh
Last active September 21, 2021 02:28
Patch zplug locally with pull requests not yet approved
#!/usr/bin/env zsh
# Install zplug if not installed, and patch it locally by merging pull requests by id.
PULL_REQUEST_IDS="$@"
run_remote_zsh_script() {
local url="$1"
shift
curl -sL --proto-redir -all,https "$url" | zsh -s "$@"
}
@CourteousCoder
CourteousCoder / ghpr-merge.zsh
Last active September 21, 2021 02:11
Script to merge pull requests from github, in order, into a locally cloned github repository
#!/usr/bin/env zsh
# Merge pull requests in the given order into a locally cloned github repository.
# Run with no arguments to print help text.
SCRIPT_NAME="$0"
# Path to repository root.
REPOSITORY_ROOT="$1"
# An array of pull-request IDs to merge locally
PULL_REQUEST_IDS="${@:2}"
@CourteousCoder
CourteousCoder / anki-mandarin-chinese.html
Last active February 20, 2020 01:31
A bookmarklet to import custom Mandarin Chinese vocabulary into Anki
<a href="javascript:(() => {
const url = 'https://www.archchinese.com/type_chinese.html';
if(window.location.href !== url) return (window.location.href = url);
let data = ['chinese', 'pinyin', 'english']
.map(col => Array
.from(document.querySelectorAll(`#vocabtable input[name='${col}[]']`))
.map(input => input.value));
csv = data[0]
.map((col, i) => data.map(row => row[i]))
.map(row => JSON.stringify(row))
@CourteousCoder
CourteousCoder / README.md
Created February 18, 2018 17:48 — forked from jhollinger/README.md
rbackup - time-stamped, hard-linked backups powered by rsync

rbackup

rbackup is a lightweight, rsync-powered backup utility that creates time-stamped backups.

Features

It can save backups to your local filesystem (probably an attached USB device) or to a remote host.

Backups are saved in time-stamped directories. Backups are cheap on storage, because hard-links are used for files that haven't changed between backups.