Last active
May 13, 2026 10:25
-
-
Save mh0w/3c4cfb99a19d5cdff070263457f8c0f8 to your computer and use it in GitHub Desktop.
.bashrc / .profile
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
| # 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