Merge branch 'main' of https://github.com/Donaldttt/dotfiles into main
This commit is contained in:
+5
-3
@@ -1,10 +1,13 @@
|
||||
source bash_tools/helper.sh
|
||||
# args:
|
||||
# $1:
|
||||
# The IP address you want to query geo info for.
|
||||
# If no argument supplied, the host machine's ip will
|
||||
# be used
|
||||
# doc for api: https://ip-api.com/docs/api
|
||||
DOT_FILE_DIR=$(dirname ${BASH_SOURCE[0]})/
|
||||
|
||||
source $DOT_FILE_DIR/bash_tools/helper.sh
|
||||
|
||||
function ipinfo(){
|
||||
local api_str="http://ip-api.com/json/$1?fields=query,country,regionName,city,district,zip,isp,org,reverse,mobile,proxy,hosting"
|
||||
if ! hash python; then
|
||||
@@ -29,7 +32,6 @@ function dict(){
|
||||
python $
|
||||
}
|
||||
|
||||
|
||||
# Linux specific functions
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
|
||||
@@ -68,4 +70,4 @@ fi
|
||||
# -t: Sort by time. Display the newest first
|
||||
# alias ls=ls -At
|
||||
|
||||
source $HOME/.vim-config/bash_tools/fzf_file_seletor.sh
|
||||
source $DOT_FILE_DIR/bash_tools/fzf_file_seletor.sh
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# get self-host server ip
|
||||
SERVERIP=x.useless.pw
|
||||
ip=$(ifconfig | grep -Po 10.0.0.[01][0-9]+)
|
||||
|
||||
$(which ifconfig > /dev/null 2>&1) && \
|
||||
ip=$(ifconfig | grep -Po "10.0.0.[01][0-9]+")
|
||||
|
||||
[ "$ip" != "" ] && SERVERIP=10.0.0.100
|
||||
|
||||
Reference in New Issue
Block a user