记录那些工作中的小Tips

分类:管理 |

记录那些工作中的小Tips


1. 命令行 curl:


curl -o /dev/null --socks5 127.0.0.1:10808 -s -w "time_connect=%{time_connect}&time_starttransfer=%{time_starttransfer}&time_total=%{time_total}&http_code=%{http_code}" "https://www.google.com"  

返回结果: 执行时间 -w 取值, 直接使用代理 --socks5

time_connect=0.009277&time_starttransfer=0.372332&time_total=0.395392&http_code=200


curl 指定代理:

socks 代理:

--socks5 127.0.0.1:10808 或 -x socks5://127.0.0.1:10808

http https 代理:

-x 127.0.0.1:10808



2. Mac下 使用tmux时无法正常选择并复制:

解决方法: 按下 Fn + 选择 即可


.tmux.conf 

# Send prefix:把prefix的ctrl+b变为了ctrl+a
#set-option -g prefix C-a
#unbind-key C-a
#bind-key C-a send-prefix

# Use Alt-arrow keys to switch panes
# 直接用alt+箭头在pane之间切换
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D

# Shift arrow to switch windows
# 直接使用shift+箭头在window之间切换
bind -n S-Left previous-window
bind -n S-Right next-window

# Mouse mode
# 用鼠标自由调整pane大小,还可以通过右键实现一些基本操作
set -g mouse on


# Set easier window split keys
# 使用v代表横向分割,h代表纵向。比%和"更直观一些
bind-key v split-window -h
bind-key h split-window -v

# Easy config reload
# 修改完.tmux.conf配置之后不需要tmux kill-session 
# 直接prefix+r就可以重新加载。
#(这里其实没必要设置,因为后面配置了保存工作区的插件,
# 快捷键冲突,真的需要这个功能可以把快捷键换成别的。)

#bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded"