Skip to content

Instantly share code, notes, and snippets.

@phylake
phylake / ssh_port_forward.sh
Created August 14, 2014 15:46
ssh port forwarding
# forward local port 8080 to remotehost.com:3001
ssh -L 8080:localhost:3001 -N [email protected]
wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install -y erlang
@phylake
phylake / .gitattributes
Created October 18, 2014 21:16
.gitattributes
* text=auto
*.bat text eol=crlf

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@phylake
phylake / hosts.sh
Created December 5, 2015 18:13
discover hosts on a network
ifconfig | grep broadcast | arp -a
@phylake
phylake / tcp_send_challenge_ack.stap
Created June 12, 2019 19:02
tcp_send_challenge_ack.stap
probe kernel.function("tcp_send_challenge_ack") {
printf("tcp_send_challenge_ack local=%s:%d remote=%s:%d\n",
format_ipaddr(tcpmib_local_addr($sk), AF_INET),
tcpmib_local_port($sk),
format_ipaddr(tcpmib_remote_addr($sk), AF_INET),
tcpmib_remote_port($sk)
);
}