Skip to content

Instantly share code, notes, and snippets.

View slifty's full-sized avatar

Daniel Schultz slifty

View GitHub Profile
@slifty
slifty / git-commit-edit-alias.md
Last active December 12, 2023 17:42
Git alias to edit a commit

A git alias to edit the content of a commit

This git alias allows you to remove specific changes from a past commit / from git history and place those changes into your working directory, outside of your git history.

For example, maybe a code reviewer has identified a few files or lines that belong in their own commit or pull request. This helps you do git commit surgery on specific commits without needing to manually re-play.

git edit {commithash}

(e.g. git edit HEAD would edit the most recent commit or git edit c52b7bfe12c2f6082a69ea339eeec95a20532fa5 would edit a specific commit)

# itemguard -- un/closet pvpables by value, with managed exceptions
# configuration
int closet_value_higher_than = 1000;
boolean[item] always_bag = $items[Freddy Kruegerand]; # list "none" rather than empty!
boolean[item] always_closet = $items[sand dollar, hobo nickel, bowling ball];
# donfiguration
boolean pvpable(item it) {
return it.tradeable && it.discardable && !it.gift; # && !it.quest
@PurpleBooth
PurpleBooth / README.md
Last active September 17, 2021 15:07
Change your default branch on github without checkout anything out

change-github-default-branch.sh

Usage

change-github-default-branch.sh "$GITHUB_TOKEN" PurpleBooth/homebrew-repo

Does not delete the old default branch, or change where pull requests are based from, incase something breaks.

@nitrag
nitrag / convert_m4b.sh
Last active November 11, 2024 02:50
Audibook convert m4b to mp3. This will split into chaptered mp3 files and automatically reconfigure proper ID3v2 tags.
#!/bin/bash
#
# sudo apt-get install id3v2 ffmpeg
#
# USAGE:
# cd /book title/
# bash ~/this_script_path.sh
# rm *.m4b (you need to manually remove the original in case something goes wrong)
#
#