Skip to content

Commit

Permalink
Add saving and restoring base64 of files
Browse files Browse the repository at this point in the history
  • Loading branch information
j-frost committed Jul 9, 2023
1 parent e53f3b0 commit 1a6f02b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions home_files/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ source $ZSH/oh-my-zsh.sh
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

function save_env_to_gitpod () {
echo "Saving file ${2} to Gitpod environment variable called ${1}"
gp env $1="$(base64 -w0 $2)" > /dev/null
}

function restore_file_from_gitpod () {
echo "Restoring file ${2} from Gitpod environment variable called ${1}"
echo ${(P)1} | base64 -d > ${2}
}

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
source ~/powerlevel10k/powerlevel10k.zsh-theme

0 comments on commit 1a6f02b

Please sign in to comment.