[TOC]

field
http.time HTTP response time you can use the
tcp.analysis.initial_rtt to get the TCP Round trip time
TCP timestamps
http.response and tcp.time_delta>X
For this to work, you need to disable reassembly (so that the first response packet is listed instead of the last packet of the response). This must be done in the TCP protocol preferences too (deselect “allow subdissector to reassemble tcp streams”.
Visualising response time of a web server using Wireshark

[TOC]

FreeBSD SystemTuning

https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt
https://rolande.wordpress.com/2010/12/30/performance-tuning-the-network-stack-on-mac-osx-10-6/
http://web.archive.org/web/20110611213330/http://macgeekery.com/tips/configuration/mac_os_x_network_tuning_guide_revisited
http://fasterdata.es.net/host-tuning/
http://www.firewall.cx/networking-topics/protocols/tcp/137-tcp-window-size-checksum.html
bufferbloat https://www.bufferbloat.net/projects/bloat/wiki/Introduction/

[TOC]

常用git命令
differences from branch git log master..branch-X
man gitrevisions
It will display commits in develop which are not in master branch. git log origin/master..origin/develop –oneline –no-merges
If you want to see which files are actually modified use git diff –stat origin/master..origin/develop –no-merges
–no-merges
Do not print commits with more than one parent. This is exactly the same as –max-parents=1.
If you don’t specify arguments it will display the full diff. If you want to see visual diff, install meld on linux, or WinMerge on windows. Make sure they are the default difftools .Then use something like
git difftool -y origin/master..origin/develop –no-merges
In case you want to compare it with current branch. It is more convenient to use HEAD instead of branch name like use:
git fetch git log origin/master..HEAD –oneline –no-merges
git log git log –graph –decorate –stat -p
git log –oneline –graph –all –decorate –abbrev-commit
git log –graph –pretty=format:’%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset’ –abbrev-commit –date=relative master..branch-X
git log –oneline –graph –all –decorateis enough,–abbrev-commitis not required,–onelineis short for–pretty=oneline –abbrev-commit
git config –global log.decorate true
git config –global log.abbrevCommit true

钱少推荐的xcode theme Monokai

Monokai上图效果:

安装方法:

$ mkdir -p ~/Library/Developer/Xcode/UserData/FontAndColorThemes/
$ cp Monokai.dvtcolortheme ~/Library/Developer/Xcode/UserData/FontAndColorThemes/

只要 ip 可以 curl haoip.cn -s|grep 当前 IP|awk -F ‘ ‘ ‘{print $2;}’

curl haoip.cn/simple
$ curl haoip.cn/json

查询域名拥有者 https://whois.icann.org
ip whois (输入验证码) https://www.whois.com/whois/
workaround https://www.whois.com/whois/117.x.y.z
https://ram.console.aliyun.com/settings
就是一个干净的 IP curl ifconfig.me
json curl ipinfo.io
curl myip.ipip.net
pip.net ,免费的 API 每秒五次,每天 1000 次, 最大频率 1.44分钟查询一次
http://members.3322.org/dyndns/getip
http://ip.taobao.com/service/getIpInfo2.php?ip=myip
dig +short myip.opendns.com @resolver1.opendns.com
dig +short myip.opendns.com @resolver1.opendns.com
dig +short @resolver1.opendns.com myip.opendns.com
dig +short myip.opendns.com @resolver2.opendns.com
curl -s ip.appspot.com
curl ipinfo.io/ip
CentOS/RHEL/Fedora yum install bind-utils -y
debian/ubuntu apt-get install dnsutils -y
A (the IP address), CNAME ( canonical name) TXT (text record), MX (mail exchanger) and NS (name servers).

https://golang.org/doc/gdb

When you compile and link your Go programs with the gc toolchain on Linux, Mac OS X, FreeBSD or NetBSD, the resulting binaries contain DWARFv3 debugging information that recent versions (>7.1) of the GDB debugger can use to inspect a live process or a core dump.
Pass the ‘-w’ flag to the linker to omit the debug information (for example, go build -ldflags “-w” prog.go).
The code generated by the gc compiler includes inlining of function invocations and registerization of variables. These optimizations can sometimes make debugging with gdb harder. To disable them when debugging, pass the flags -gcflags “-N -l” to the go command used to build the code being debugged.
If you want to use gdb to inspect a core dump, you can trigger a dump on a program crash, on systems that permit it, by setting GOTRACEBACK=crash in the environment (see the runtime package documentation for more info).

  1. [a-zA-Z0-9] 字母和数字保持不变
  2. “.”,”-“,”*“,”_” 保持不变
  3. “ “(space)转化 加号”+”
  4. 其它字符Character都是不安全的,需要转换表示方法,即编码。根据选定的编码方案可能转化为多个字节(byte),每个字节的表示形式为 3-character的字符串”%xy”,其中xy均为2位的16进制数,表示一个byte的value. 推荐使用的编码方式是UTF-8.如果没有明确指定编码方式,则采用OS默认的编码方案encode scheme.

后台程序读取终端将进入暂停状态

需要从STDIN读取输入的程序,后台运行时出行 suspended(tty input) 状态,在后台处于暂停工作状态。

  • 演示:
    $cat cread.sh
    while read foo; do

    echo Foo is $foo
    

    done
    $ ./cread.sh
    this
    Foo is this
    ^C
    ~/work/shell choe@MBP⌚ 14:20:11
    $ ./cread.sh &
    [2] 2357
    [2] + 2357 suspended (tty input) ./cread.sh
    ~/work/shell choe@MBP⌚ 14:20:20
    $ fg
    [2] - 2357 continued ./cread.sh

    Foo is
    ~/work/shell choe@MBP⌚ 14:20:56

    引入 STDIN redirect 功能

    $ ./cread.sh < /dev/null &
    [2] 2368
    [2] - 2368 done ./cread.sh < /dev/null
    ~/work/shell choe@MBP⌚ 14:21:13
    $ ps -ef|grep cread

    501  2346   564   0  2:20下午 ttys005    0:00.00 sh ./cread.sh
    

    ssh dynamic forward 后台运行

    $ ssh -T -D 1080 root@192.168.66.100 </dev/null &
    [1] 2665
    ~/blog on  master! choe@MBP⌚ 14:33:12
    $ Last failed login: Fri Nov 24 06:33:09 UTC 2017 from 192.168.145.21 on ssh:notty
    There were 4667 failed login attempts since the last successful login.

    [1] + 2665 done ssh -T -D 1080 root@192.168.66.100 < /dev/null
    加入STDIN重定向</dev/null 后,然而ssh 自动退出了,
    ~/blog on  master! choe@MBP⌚ 14:33:16
    $ ps -ef|grep ssh

    501  1426     1   0 10:56上午 ??         0:00.05 /usr/bin/ssh-agent -l
    

    ~/blog on  master! choe@MBP⌚ 14:38:37
    $ ssh -TnN -D 1080 root@192.168.66.100 &
    [1] 2706
    ~/blog on  master! choe@MBP⌚ 14:38:57
    $ ps -ef|grep ssh

    501  1426     1   0 10:56上午 ??         0:00.05 /usr/bin/ssh-agent -l
    501  2706   499   0  2:38下午 ttys001    0:00.03 ssh -TnN -D 1080 root@192.168.66.100
    

    ~/blog on  master! choe@MBP⌚ 14:39:09