Open ~/.bash_profile
in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {
atom-text-editor::shadow { | |
.line-numbers{ | |
padding-left: 4px !important; | |
} | |
.git-line-modified, .git-line-added{ | |
margin-left: -4px; | |
padding-left: 2px !important; | |
opacity: .5 | |
} |
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset | |
# Regular Colors | |
Black="\[\033[0;30m\]" # Black | |
Red="\[\033[0;31m\]" # Red | |
Green="\[\033[0;32m\]" # Green | |
Yellow="\[\033[0;33m\]" # Yellow | |
Blue="\[\033[0;34m\]" # Blue | |
Purple="\[\033[0;35m\]" # Purple |
#!/bin/bash | |
# Bash Progress Bar: https://gist.github.com/F1LT3R/fa7f102b08a514f2c535 | |
progressBarWidth=20 | |
# Function to draw progress bar | |
progressBar () { | |
# Calculate number of fill/empty slots in the bar |
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just
Install HomeBrew first
brew update
brew tap caskroom/cask
brew install brew-cask
If you get the error "already installed", follow the instructions to unlink it, then install again:
curl
to get the JSON response for the latest releasegrep
to find the line containing file URLcut
and tr
to extract the URLwget
to download itcurl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
image: python:3.8.3 | |
# pipeline stages definitions | |
test: &test | |
step: | |
name: test | |
caches: | |
- pip | |
script: | |
- python --version |
With time the .kube/config file will contain a mix of dev, test and prod cluster references.
It is easy to forget switching off from a prod cluster context and make a mistake and run for example kubectl delete ns crossplane-system
.
Use the following setup to avoid these kinds of errors and keep clusters separate.