Skip to content

Instantly share code, notes, and snippets.

View jeffchao's full-sized avatar
:shipit:

Jeff Chao jeffchao

:shipit:
View GitHub Profile
@jeffchao
jeffchao / scales
Created July 25, 2014 21:41
Programming scale
The full scale (which is explained) is:
10 - Wrote the book on it (there must be a book)
9 - Could have written the book, but didn't.
8 - Deep understanding of corner cases and esoteric features.
7 - Understanding and (appropriate) usage of most lesser known features.
6 - Can develop large programs and deploy new systems from scratch.
5 - Can develop/deploy larger programs/systems using all basic (w/o book) and more esoteric features (some w/ book, some without)
4 - Can develop/deploy medium programs/systems using all basic (w/o book) and a few esoteric features (w/ book). Understands enough about internals to do nontrivial troubleshooting.
3 - Can utilize basic features without much help, manage a small installation competently.
@jeffchao
jeffchao / docker-mac.sh
Last active February 7, 2017 18:16
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
docker-machine start
eval $(docker-machine env default)
docker ps
@jeffchao
jeffchao / ssh-reverse-tunnel-bastion
Last active February 20, 2020 01:58
ssh reverse tunnel into bastion
ssh -t bastion -L localhost:port:remotehost:port
use jconsole, visualvm, zmc, etc.
-L [bind_address:]port:host:hostport
-L [bind_address:]port:remote_socket
-L local_socket:host:hostport
-L local_socket:remote_socket
Specifies that connections to the given TCP port or Unix socket on the local (client) host are to be forwarded to the given host and port, or Unix
socket, on the remote side. This works by allocating a socket to listen to either a TCP port on the local side, optionally bound to the specified
bind_address, or to a Unix socket. Whenever a connection is made to the local port or socket, the connection is forwarded over the secure channel,