Last active
April 17, 2023 18:38
-
-
Save teshanshanuka/6101344fd8a84d669a9f74a2b123a70e to your computer and use it in GitHub Desktop.
My zsh aliases
This file contains 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
# To hide stderr from command output (e.g. `find -name "something" NOERR`) | |
alias -g NOERR="2>/dev/null" | |
# epoch time(sec) to date - `epocht 123456789` or `echo 123456789 | epocht` | |
epocht() { | |
if [ -z $1 ]; then read ip; else ip=$1; fi | |
date -d @$ip +"%Y-%m-%d %T" | |
} | |
# find text in directory | |
alias fgrepr="fgrep -rIn --exclude-dir={.git,.vscode,node_modules,.yarn,.gem,lib,logs,.catkin_tools,build}" | |
alias publicip="curl -s ipinfo.io/ip; echo" | |
function weather() { | |
curl -s "wttr.in/${1:-odense}" # | (head -n7; tail -n3) | sed -n '1,8p' -- for a short mode | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment