This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Source: https://stackoverflow.com/questions/36358265/when-does-git-refresh-the-list-of-remote-branches | |
| # To update the local list of remote branches: | |
| git remote update origin --prune |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo -e "\e[32;1mSet\e[0m" | |
| echo -ne "\e[1m 1: Bold \e[0m" | |
| echo -ne "\e[2m 2: Dim \e[0m" | |
| echo -ne "\e[3m 3: Italic \e[0m" | |
| echo -ne "\e[4m 4: Underlined \e[0m" | |
| echo | |
| echo -ne "\e[5m 5: Blink \e[0m" | |
| echo -ne "\e[6m 6: Overline \e[0m" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # a refinement of https://stackoverflow.com/a/5255468/519360 | |
| # see also my non-translating version at https://stackoverflow.com/a/28466267/519360 | |
| # translate long options to short | |
| reset=true stopped="" | |
| for opt in "$@"; do | |
| if [ -n "$reset" ]; then | |
| unset reset | |
| set -- # reset the "$@" array so we can rebuild it | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ps aux|head -1 | |
| # Returns: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND | |
| ps axo user,pid,ppid,pcpu,pmem,vsz,rss,tname,stat,start,time,args|head -1 | |
| # Returns: USER PID PPID %CPU %MEM VSZ RSS TTY STAT STARTED TIME COMMAND |