This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# License: MIT (https://opensource.org/licenses/MIT) | |
# Copyright © 2022 Jonathan Wren <jonathan@nowandwren.com> | |
# https://gist.github.com/wren/e6e2fb695ce4b1b745405efbbbb93b93 | |
# | |
# Wraps borg (borgbackup), and uses yq to get config variables | |
# to pass to borg for easier use | |
# | |
# See bottom of file for configurable variables. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# License: MIT (https://opensource.org/licenses/MIT) | |
# Copyright © 2022 Jonathan Wren <jonathan@nowandwren.com> | |
# https://gist.github.com/wren/e45b2c49d7a08bb718c683ad986793da | |
# | |
# Generates and shows diffs for images in a terminal | |
# functions | |
function exif() { | |
exiftool "$1" -@ ~/.config/git/misc/exiftool-args |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# License: WTFPL (http://www.wtfpl.net/about/) | |
# | |
# Test vim startup time using hyperfine | |
hyperfine --warmup 5 \ | |
-L cmd 'nvim,lvim' \ | |
-L file ',init.lua' \ | |
-L rc '--clean,,-i NONE' \ | |
'{cmd} +qa {rc} {file}' \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# License: WTFPL (http://www.wtfpl.net/about/) | |
# | |
# less + bat + batpipe | |
if [[ -t 0 ]]; then | |
# normal usage | |
less -F ${@:-.} | |
else | |
# being piped to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# License: MIT (https://opensource.org/licenses/MIT) | |
# Copyright © 2021-2022 Jonathan Wren <jonathan@nowandwren.com> | |
# https://gist.github.com/wren/c7a385e0b59c1f4cdeb0b81f099f1610 | |
# | |
# Packs and unpacks files and directories using zst (and tar as needed). | |
set -e | |
set -u | |
set -o pipefail |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# License: MIT (https://opensource.org/licenses/MIT) | |
# Copyright © 2021 Jonathan Wren <jonathan@nowandwren.com> | |
# https://gist.github.com/wren/270babdcdc007d3186768986d3f3da81 | |
# | |
# Template for shell scripts with a few functions I commonly use | |
set -e | |
usage_small() { | |
echo "title - description lorem ipsum dolor sit amet" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# License: MIT (https://opensource.org/licenses/MIT) | |
# Copyright © 2021 Jonathan Wren <jonathan@nowandwren.com> | |
# https://gist.github.com/wren/cad91379c42f02bbcaff5e5f6a74255a | |
# | |
# Runs backups using Borg, and notifies on success/failure using | |
# healthchecks.io. Very configurable, and supports debug mode. | |
# | |
# See bottom of file for configurable variables. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# License: MIT (https://opensource.org/licenses/MIT) | |
# Copyright © 2022 Jonathan Wren <jonathan@nowandwren.com> | |
# https://gist.github.com/wren/87d82952f24d503c14888e0430a46b17 | |
# | |
# Outputs a list of git branches in a nicely formatted, and colored table | |
# colors | |
color_local_branch=3 | |
color_remote_branch=14 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.qqMC3e { | |
color: #fff !important; | |
} | |
.LKeQwe span { | |
color: rgb(186, 186, 186); | |
} | |
.UflSff span, .UflSff { | |
color: #78787A !important; |