This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YELLOW="\[\033[0;33m\]" | |
CLEAR="\[\033[0;0m\]" | |
PS1="\$(date +%H:%M) \w$YELLOW \$(parse_git_branch)$CLEAR \$ " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Diff with master | |
>> git diff master — filename | |
# Checkout submodule | |
>> git submodule update | |
# Undo last commit | |
>> git reset —soft HEAD~1 | |
# Add remote repo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basic get request | |
>> curl -v http://www.test.com | |
# Get request with a header | |
>> curl -v http://www.test.com?debug=1 -H "Cookie: Key=Value;” |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (Maximum TCP Sender Window) | |
>> /proc/sys/net/ipv4/tcp_wmem | |
4096 16384 4194304 | |
(Maximum TCP Receive Window) | |
>> /proc/sys/net/ipv4/tcp_rmem | |
4096 87380 6291456 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# current receiver window size | |
>> sysctl -n net.ipv4.tcp_rmem | |
4096 87380 2063584 (2Mb) | |
# current sender window size | |
>> sysctl -n net.ipv4.tcp_wmem | |
4096 87380 2063584 (2Mb) | |
# maximum segment size | |
>> sysctl -n net.ipv4.tcp_app_win |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Current receiver window size (12Mb) | |
>> sudo su | |
>> echo 'net.ipv4.tcp_rmem= 4096 87380 12582912' >> /etc/sysctl.conf | |
>> sysctl -p | |
# Current sender window size (12Mb) | |
>> sudo su | |
>> echo 'net.ipv4.tcp_rmem= 4096 87380 12582912' >> /etc/sysctl.conf | |
>> sysctl -p |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SO_SNDBUF | |
# Cannot exceed maximum size available in kernel config | |
# Kernel config: /proc/sys/net/core/rmem_max | |
212992 | |
# SO_RCVBUF | |
# Cannot exceed maximum size available in kernel config | |
# kernel config: /proc/sys/net/core/wmem_max | |
212992 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> cat /proc/sys/net/ipv4/tcp_fin_timeout | |
60 seconds | |
# To change the value | |
>> echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> echo 30 > /proc/sys/net/ipv4/tcp_keepalive_intvl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> echo 5 > /proc/sys/net/ipv4/tcp_keepalive_probes |