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
PCreations /
Last active Jul 16, 2021
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 2, 2021
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 Jun 9, 2021
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 2, 2021
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
View .bash_profile
export PS1="\[\e[00;37m\]\n\[\e[0m\]\[\e[01;36m\][\A]\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[01;32m\]\u\[\e[0m\]\[\e[01;36m\]@\[\e[0m\]\[\e[01;33m\]\h:\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[01;35m\]\w\[\e[0m\]\[\e[00;37m\]\n\[\e[0m\]\[\e[01;35m\]->\[\e[0m\]\[\e[00;37m\] \[\e[0m\]"
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
# Composer Alias
alias composer='php /usr/bin/composer.phar'
# Laravel 4 Artisan
alias art='php artisan'
myusuf3 /
Created Nov 3, 2014
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule