This file contains 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
*.json diff=gron | |
*.yaml diff=ygron |
This file contains 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 | |
set -euo pipefail | |
case $# in | |
1) | |
diff -u --color --label="$1 @ HEAD" --label="$1" <(git show "HEAD:$1" | yq4 -oj | gron) <(yq4 -oj "$1" | gron) | |
;; | |
2) | |
diff -u --color --label="$1 @ $2^" --label="$1 @ $2" <(git show "$2^:$1" | yq4 -oj | gron) <(git show "$2:$1" | yq4 -oj | gron) | |
;; |
This file contains 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
// Zashs Swedish Dvorak | |
// setxkbmap -I$HOME/.xkb prog -print | xkbcomp -I$HOME/.xkb - $DISPLAY | |
partial alphanumeric_keys | |
xkb_symbols "zdvorak" { | |
include "se" | |
include "se(dvorak)" | |
name[Group1]="Sweden - Zashs Dvorak"; |
This file contains 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/sh | |
THEME=Materia-dark-compact | |
if type xfconf-query >/dev/null ; then | |
xfconf-query -c xsettings -p /Net/ThemeName -s $THEME | |
fi | |
if type gsettings >/dev/null ; then | |
gsettings set org.gnome.desktop.interface gtk-theme $THEME | |
fi |
This file contains 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 | |
# Yaml EDIT | |
# Uses https://github.com/mikefarah/yq/ installed as yq4 | |
# Optionally uses https://github.com/junegunn/fzf | |
set -euo pipefail | |
declare file="" | |
declare editformat="yaml" | |
declare origformat="" | |
declare editsuffix="" |
This file contains 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/sh -e | |
if [ -z "$1" ]; then | |
echo "usage: $1 example.com [client|server]" | |
exit 1 | |
fi | |
xmppdomain="$1" | |
adomain="$1" | |
if type idn2 >/dev/null 2>/dev/null ; then |
This file contains 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 | |
set -eo pipefail | |
ZONE="$(hostname -d)" | |
FQDN="$(hostname -f)" | |
UPDATES="$(mktemp --suffix .nsupdate)" | |
trap 'rm -- "$UPDATES"' EXIT | |
{ |
This file contains 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
[pull] | |
ff = only | |
[commit] | |
verbose = true | |
[alias] | |
amend = commit --amend --no-edit | |
ci = commit | |
co = checkout | |
each = submodule foreach git | |
fa = fetch --all -p |
This file contains 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 | |
# RFC 7591 OAuth 2.0 Dynamic Client Registration Protocol | |
set -euo pipefail | |
BASE_DOMAIN="$1" | |
OAUTH_META="$(curl -sSfL "https://$BASE_DOMAIN/.well-known/oauth-authorization-server" -H Accept:application/json)" | |
ISSUER="$(echo "$OAUTH_META" | jq -r '.issuer')" | |
REGISTRATION_ENDPOINT="$(echo "$OAUTH_META" | jq -r '.registration_endpoint')" |
This file contains 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 | |
set -eo pipefail | |
ZONE="$1"; | |
if ! shift; then | |
echo "Usage: $0 ZONE" | |
exit | |
fi |
NewerOlder