Skip to content

Instantly share code, notes, and snippets.

@0x4C4A
0x4C4A / cecho
Last active May 20, 2020 13:26 — forked from eahrold/cecho
Color Read / Color Echo in bash
#!/bin/bash
colorread(){
case "$1" in
red|alert) local COLOR=$(printf "\\e[1;31m");;
green|attention) local COLOR=$(printf "\\e[1;32m");;
yellow|warn) local COLOR=$(printf "\\e[1;33m");;
blue|question) local COLOR=$(printf "\\e[1;34m");;
purple|info) local COLOR=$(printf "\\e[1;35m");;
cyan|notice) local COLOR=$(printf "\\e[1;36m");;
@0x4C4A
0x4C4A / git-settings.sh
Last active April 18, 2017 05:14 — forked from anonymous/git-settings.sh
My preferred git settings
#!/bin/sh
# My favourite flavour of git lg
git config --global alias.lga "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) -%C(bold yellow)%d%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset) %C(bold green)(%ar)%C(reset)' --all --date-order"
git config --global alias.lg "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) -%C(bold yellow)%d%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset) %C(bold green)(%ar)%C(reset)' --date-order"
# Rebase by default for all new branches
git config branch.autosetuprebase always
# Remember login details
git config --global credential.helper "store"