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 | |
# do not use locales | |
export LC_ALL=C | |
# tmp dir | |
readonly GITME_TMPDIR="$HOME/.gitme/tmp" | |
mkdir -p $GITME_TMPDIR >/dev/null 2>&1 | |
# top dir from environment variable |
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 bash | |
if [ $# -eq 0 ]; then | |
cat << __EOF__ | |
Usage: $(basename $0) KEXT_FILE | |
__EOF__ | |
exit 0 | |
fi | |
echo "Installing $1" |
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 bash | |
# OpenSSH 7.0 and greater similarly disable the ssh-dss (DSA) public key algorithm. | |
# It too is weak and we recommend against its use. | |
# It can be re-enabled using the HostKeyAlgorithms configuration option: | |
# ssh -oHostKeyAlgorithms=+ssh-dss user@legacyhost | |
# or in the ~/.ssh/config file: | |
# Host somehost.example.org | |
# HostKeyAlgorithms +ssh-dss | |
# http://www.openssh.com/legacy.html |
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 bash | |
# Delete all local branches that are already merged into master or main | |
git branch --merged master | grep -v '^[ *]*master$' | xargs git branch -d | |
git branch --merged main | grep -v '^[ *]*main$' | xargs git branch -d | |
# End of 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 bash | |
echo "Rename git branch master -> main" | |
git branch -m master main | |
git fetch origin | |
git branch -u origin/main main | |
git remote set-head origin -a | |
# End of 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 bash | |
git branch -v --sort=-committerdate --remote --merged \ | |
| grep -ve 'origin/main' -ve 'origin/master' -ve 'origin/HEAD' \ | |
| xargs -L1 | |
# remove to keep only 10 lines | |
#| sed 1,10d | tac | |
# End of 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 bash | |
DRY_RUN=0 | |
case $1 in | |
# --dry-run | |
# Show what would be done, without making any changes | |
--dry-run) DRY_RUN=1 ;; | |
esac |
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 bash | |
mkdir -p ~/Library/KeyBindings | |
cat >> ~/Library/KeyBindings/DefaultKeyBinding.dict << __EOF__ | |
{ | |
"~ " = ("insertText:", " "); | |
} | |
__EOF__ |
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 bash | |
# Documentation of CPU governors | |
# http://www.kernel.org/doc/Documentation/cpu-freq/governors.txt | |
[ $# -lt 1 ] && ( | |
echo "Usage: $(basename $0) [performance|powersave|userspace|ondemand|conservative]" | |
exit 0 | |
) |
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 bash | |
read -p "WARNING: Close all snaps before running this. Continue? [y|N] " ans | |
[ "$ans" != "y" ] && exit 1 | |
export LANG=en_US.UTF-8 | |
set -eu | |
# Set the maximum number of snap revisions stored for each package. | |
# It can only be a number between 2 and 20 and has a default value of 3. |
NewerOlder