Skip to content

Instantly share code, notes, and snippets.

View bretonics's full-sized avatar
:octocat:
Decoding the world, one line at a time

Andrés Bretón bretonics

:octocat:
Decoding the world, one line at a time
View GitHub Profile
@geddski
geddski / styles.less
Last active April 3, 2017 10:09
improve Atom editor git gutter
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
}
@joseluisq
joseluisq / terminal-git-branch-name.md
Last active April 20, 2024 02:26
Add Git Branch Name to Terminal Prompt (Linux/Mac)

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

image

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

# Git branch in prompt.

parse_git_branch() {
@roartalent
roartalent / .bash_profile
Created August 31, 2015 09:21
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
@F1LT3R
F1LT3R / progress-bar.sh
Created January 22, 2016 14:20
Bash Progress Bar
#!/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
@rvl
rvl / git-pushing-multiple.rst
Created February 9, 2016 11:41
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

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

@tomysmile
tomysmile / brew-java-and-jenv.md
Last active April 20, 2022 16:14
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:

@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active April 29, 2024 09:32
One Liner to Download the Latest Release from Github Repo
  • 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 https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@PCreations
PCreations / rxjs-diagrams.md
Last active January 18, 2024 08:52
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K
@shaypal5
shaypal5 / bitbucket-pipelines.yml
Created July 30, 2020 13:14
Bitbucket status badges
image: python:3.8.3
# pipeline stages definitions
test: &test
step:
name: test
caches:
- pip
script:
- python --version
@Piotr1215
Piotr1215 / connect-k8s.md
Last active April 18, 2022 12:22
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