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
#!/usr/bin/env bash | |
# First, store your PERSONAL GITHUB TOKEN as secret file somewhere. | |
# You can generate your personal github token here: https://github.com/settings/tokens. Check the | |
# "Full control of private repositories" scope. | |
# In the example below, token is stored as a json file "github_token.json" under secrets directory in the form of: | |
# { "token": "PERSONAL_GITHUB_TOKEN" } | |
# Check Secrets | |
[[ -f secrets/github_token.json ]] || { echo "Error: github token is unavailable!" >&2; exit 1; } |
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
#!/usr/bin/env bash | |
# Read usr inputs | |
read -p "Enter repo name (eg: USERNAME/REPO_NAME or ORG_NAME/REPO_NAME): " GITHUB_REPO && [[ -n $GITHUB_REPO ]] || { | |
echo "Error: REPO_NAME must exist!" >&2; exit 1; | |
} | |
read -p "Is the new repo an organization repo (y/N)?: " IS_ORG && [[ $IS_ORG == [yYNn] ]] || { | |
echo "IS_ORG must be either y (yes) or n (no)!" >&2; exit 1; | |
} |
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
# split panes using | and - | |
bind \ split-window -h | |
bind - split-window -v | |
unbind '"' | |
unbind % | |
# switch panes using Alt-arrow without prefix | |
bind -n M-Left select-pane -L | |
bind -n M-Right select-pane -R | |
bind -n M-Up select-pane -U |