Merge pull request #6 from jotyGill/develop

Develop: Added geoip, corona, renamed wip to myip
This commit is contained in:
jotyGill
2020-03-30 07:17:58 +00:00
committed by GitHub
2 changed files with 26 additions and 4 deletions

23
.zshrc
View File

@@ -148,7 +148,7 @@ autoload -U compinit && compinit # zsh-completions
SAVEHIST=50000 #save upto 50,000 lines in history. oh-my-zsh default is 10,000
#setopt hist_ignore_all_dups # dont record duplicated entries in history during a single session
alias wip="wget -qO- https://wtfismyip.com/text" # quickly show external ip address
alias myip="wget -qO- https://wtfismyip.com/text" # quickly show external ip address
alias l="ls -lah"
alias x="exit"
alias k="k -h" # show human readable filesizes, in kb, mb etc
@@ -181,6 +181,7 @@ dadjoke() {
curl https://icanhazdadjoke.com
}
# Find dictionary definition
dict() {
if [ "$3" ]; then
curl "dict://dict.org/d:$1 $2 $3"
@@ -190,3 +191,23 @@ dict() {
curl "dict://dict.org/d:$1"
fi
}
# Find geo info from IP
ipgeo() {
# Specify ip or your ip will be used
if [ "$1" ]; then
curl "http://api.db-ip.com/v2/free/$1"
else
curl "http://api.db-ip.com/v2/free/$(myip)"
fi
}
# Show covid-19 spread stats
corona() {
# Specify country otherwise shows stats for all
if [ "$1" ]; then
curl "https://corona-stats.online/$1"
else
curl "https://corona-stats.online"
fi
}

View File

@@ -2,7 +2,7 @@
A simple script to setup an awesome shell environment.
Quickly install and setup zsh and oh-my-zsh (https://github.com/robbyrussell/oh-my-zsh) with
* powerlevel10k theme (https://github.com/romkatv/powerlevel10k)
* Nerd-Fonts (even better!) (https://github.com/ryanoasis/nerd-fonts)
* Nerd-Fonts (https://github.com/ryanoasis/nerd-fonts)
* zsh-completions (https://github.com/zsh-users/zsh-completions)
* zsh-autosuggestions (https://github.com/zsh-users/zsh-autosuggestions)
* zsh-syntax-highlighting (https://github.com/zsh-users/zsh-syntax-highlighting)
@@ -17,12 +17,13 @@ Sets following useful aliases:
* alias k="k -h" - show human readable filesizes, in kb, mb etc
* x="exit"
* https - make httpie use https
* wip - (wget -qO- https://wtfismyip.com/text) - what's my ip: quickly find out external IP
* myip - (wget -qO- https://wtfismyip.com/text) - what's my ip: quickly find out external IP
* cheat - (https://github.com/chubin/cheat.sh) - cheatsheets in the terminal!
* speedtest - (curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3 -) run speedtest on the fly
* dadjoke - (curl https://icanhazdadjoke.com) - terminally sick jokes
* dict - (curl "dict://dict.org/d:$1 $2 $3") - dictionary definitions
* ipgeo - (curl "http://api.db-ip.com/v2/free/$1") - finds geo location from IP
* corona - (curl "https://corona-stats.online/") - shows corona virus spread live stats
## Demo