Skip to content

Instantly share code, notes, and snippets.

@mh0w
Last active May 13, 2026 10:25
Show Gist options
  • Select an option

  • Save mh0w/3c4cfb99a19d5cdff070263457f8c0f8 to your computer and use it in GitHub Desktop.

Select an option

Save mh0w/3c4cfb99a19d5cdff070263457f8c0f8 to your computer and use it in GitHub Desktop.
.bashrc / .profile
# Some environments (non-interactive ones like CDP, I think) use only .profile
# and not .bashrc
function hello() {
echo "Hello, $1!"
}
function checktimes {
echo "Checking recent start and end times, please wait..."
powershell -Command "& { Invoke-Expression (Get-Content -Raw '//NDATA12/hawkem$/My Documents/WindowsPowerShell/checktimes.txt') }"
}
gitt() {
# Where GH_USER is GitHub username and GH_TOKEN is unencoded ghp_... token
if [ -z "$GH_USER" ] || [ -z "$GH_TOKEN" ]; then
echo "GH_USER or GH_TOKEN not set" >&2
return 1
fi
header=$(printf "%s" "$GH_USER:$GH_TOKEN" | base64 | tr -d '\n')
git -c http.https://github.com/.extraheader="Authorization: Basic $header" "$@"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment