$ ls -li
# take note of the symlink ID
$ find / -follow -inum 5097642 2>/dev/null
# you'll have a list of symlink to that inode
These could be added to .bashrc
, .bash_profile
or similar configuration files.
# lower case UUIDs
alias uuidlc='uuidgen | tr "[:upper:]" "[:lower:]"'
# formatted date-time
alias datefmt='date +"%F %T"'
# increasing the soft limit of open files (cfr. the node.js/grunt warning/error "Warning: spawn EMFILE")
ulimit -Sn 10000
alias ll="ls -lah"
alias grep="grep --color=always"
Put the following in .vimrc
inside your home directory (~
).
" to highlight the syntax of a programming language
syntax on
" to show line numbers on the left
set nu
" to highlight the searched string inside the content
set hlsearch
" to hightlight the syntax of a JSON/javascript file based on the file extension
autocmd BufNewFile,BufRead *.json set ft=javascript
As an alternative, specific filetype settings could be put in ~/.vim/filetype.vim
, e.g.:
" to highlight the Groovy syntax for Gradle files
au BufNewFile,BufRead *.gradle setf groovy
export WHAT_IS_MY_PUBLIC_IP=$(dig +short myip.opendns.com @resolver1.opendns.com)
export WHAT_IS_MY_PRIVATE_IP=$(ifconfig eth0 | grep 'inet addr' | awk '{print $2 }' | sed 's/addr://g')
cf. https://coderwall.com/p/z5rkga/github-checkout-a-pull-request-as-a-branch
git fetch origin refs/pull/611/head:pull_611
git checkout pull_611
Uninstall all the pip
packages with a name starting with azure-
:
for i in `pip list | awk '/azure-/ {print $1}'`; do pip uninstall -y $i ; done
Rank directories by disk space usage e.g. in $HOME
:
cd $HOME && ncdu