From 390e0891c1957549384f30e26be2545bf4eeb853 Mon Sep 17 00:00:00 2001 From: wxnacy <371032668@qq.com> Date: Mon, 17 Jun 2019 17:53:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=8F=96=E7=BD=91?= =?UTF-8?q?=E7=BB=9C=E8=B5=84=E6=BA=90=20code=20=E6=88=96=E8=80=85?= =?UTF-8?q?=E7=94=A8=E6=97=B6=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VERSION | 2 +- bin/http/code | 3 +++ bin/http/time | 4 ++++ bin/http/time_format | 8 ++++++++ conf/zsh/zshrc | 3 +++ 5 files changed, 19 insertions(+), 1 deletion(-) create mode 100755 bin/http/code create mode 100755 bin/http/time create mode 100644 bin/http/time_format diff --git a/VERSION b/VERSION index c514bd8..b2e46d1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.6 +1.4.8 diff --git a/bin/http/code b/bin/http/code new file mode 100755 index 0000000..1e00422 --- /dev/null +++ b/bin/http/code @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +echo $(curl -sIL -w "%{http_code}" -o /dev/null $1) diff --git a/bin/http/time b/bin/http/time new file mode 100755 index 0000000..f151baa --- /dev/null +++ b/bin/http/time @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +curl -sIL -w "@${WS_HOME}/bin/http/time_format" -o /dev/null $1 + diff --git a/bin/http/time_format b/bin/http/time_format new file mode 100644 index 0000000..cad1cb0 --- /dev/null +++ b/bin/http/time_format @@ -0,0 +1,8 @@ + time_namelookup: %{time_namelookup}\n + time_connect: %{time_connect}\n + time_appconnect: %{time_appconnect}\n + time_redirect: %{time_redirect}\n + time_pretransfer: %{time_pretransfer}\n + time_starttransfer: %{time_starttransfer}\n + ----------\n + time_total: %{time_total}\n diff --git a/conf/zsh/zshrc b/conf/zsh/zshrc index c09c981..60d1276 100644 --- a/conf/zsh/zshrc +++ b/conf/zsh/zshrc @@ -17,6 +17,9 @@ source $ZSH/oh-my-zsh.sh # unsetopt xtrace # exec 2>&3 3>&- +if [ -f ~/.bash_profile ]; then + source ~/.bash_profile +fi if [ -f ~/.bashrc ]; then source ~/.bashrc fi