Skip to content

Instantly share code, notes, and snippets.

Decoding the world, one line at a time

Andrés Bretón bretonics

Decoding the world, one line at a time
View GitHub Profile
Piotr1215 /
Last active Apr 18, 2022
Keep cluster connections separate

How to keep cluster connections cleanly separated

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.

Direnv based setup

Use the following setup to avoid these kinds of errors and keep clusters separate.

Install direnv

shaypal5 / bitbucket-pipelines.yml
Created Jul 30, 2020
Bitbucket status badges
View bitbucket-pipelines.yml
image: python:3.8.3
# pipeline stages definitions
test: &test
name: test
- pip
- python --version
PCreations /
Last active Aug 7, 2022
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K
steinwaywhw / One Liner to Download the Latest Release from Github
Last active Aug 12, 2022
One Liner to Download the Latest Release from Github Repo
View One Liner to Download the Latest Release from Github
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
tomysmile /
Last active Apr 20, 2022
How To Install Java 8 on Mac

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:

rvl / git-pushing-multiple.rst
Created Feb 9, 2016
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.
View git-pushing-multiple.rst

Pushing to Multiple Git Repos

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

F1LT3R /
Created Jan 22, 2016
Bash Progress Bar
# Bash Progress Bar:
# Function to draw progress bar
progressBar () {
# Calculate number of fill/empty slots in the bar
View .bash_profile
# 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
joseluisq /
Last active Aug 8, 2022
Add Git Branch Name to Terminal Prompt (Linux/Mac)

Add Git Branch Name to Terminal Prompt (Linux/Mac)


Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
geddski / styles.less
Last active Apr 3, 2017
improve Atom editor git gutter
View styles.less
atom-text-editor::shadow {
padding-left: 4px !important;
.git-line-modified, .git-line-added{
margin-left: -4px;
padding-left: 2px !important;
opacity: .5