As configured in my dotfiles.
start new:
tmux
start new with session name:
package main | |
import ( | |
"fmt" | |
"log" | |
"net" | |
"net/http" | |
"os" | |
"syscall" |
package main | |
import ( | |
"io" | |
"net" | |
) | |
func main() { | |
// '@' indicates the socket held in an abstract namespace | |
// which doesn't belong to a file in the filesystem |
package main | |
import ( | |
"io" | |
"net" | |
"os" | |
) | |
func main() { | |
udsPath := "/tmp/tcp-unix.sock" |
package main | |
import ( | |
"fmt" | |
"net" | |
"net/http" | |
"os" | |
) | |
func main() { |
package main | |
import ( | |
"bufio" | |
"context" | |
"flag" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"log" |
[merge] | |
tool = vimdiff | |
[mergetool] | |
prompt = true | |
[mergetool "vimdiff"] | |
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J' | |
[difftool] | |
prompt = false | |
[diff] | |
tool = vimdiff |
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"runtime" | |
"strings" | |
"time" |
As configured in my dotfiles.
start new:
tmux
start new with session name:
#! /usr/bin/env bash | |
# cancel packet delay | |
sudo tc qdisc del dev eth0 parent 1:2 | |
sudo tc qdisc del dev eth0 root |
#! /usr/bin/env bash | |
# emulate network latency in etcd cluster. | |
# set 30ms delay before sending packet that comes from source port 2380 | |
sudo tc qdisc add dev eth0 root handle 1: htb default 1 | |
sudo tc class add dev eth0 parent 1: classid 1:1 htb rate 1000kbps | |
sudo tc class add dev eth0 parent 1: classid 1:2 htb rate 1000kbps | |
sudo tc qdisc add dev eth0 parent 1:2 handle 10: netem delay 30ms | |
sudo tc filter add dev eth0 protocol ip parent 1: prio 1 u32 match ip sport 2380 0xffff flowid 1:2 |