Skip to content

Instantly share code, notes, and snippets.

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@imjching
imjching / gdb_ruby_backtrace.py
Created April 27, 2018 03:17 — forked from csfrancis/gdb_ruby_backtrace.py
Dump an MRI call stack from gdb
# Updated for Ruby 2.3
string_t = None
def get_rstring(addr):
s = addr.cast(string_t.pointer())
if s['basic']['flags'] & (1 << 13):
return s['as']['heap']['ptr'].string()
else:
return s['as']['ary'].string()
@imjching
imjching / nginx-tuning.md
Created March 4, 2018 15:42 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@imjching
imjching / README.md
Created March 3, 2018 21:11 — forked from hofmannsven/README.md
My simply Git Cheatsheet

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@imjching
imjching / Docker Notes.txt
Created March 2, 2016 11:32 — forked from MrSaints/Docker Notes.txt
Notes on initiating a Docker Machine; killing Docker processes; cleaning Docker containers, and images; and building / running / executing with Docker. Docker, Docker, Docker...
docker-start() {
docker-machine start ${1:-dev}
eval "$(docker-machine env ${1:-dev})"
export DOCKER_IP=$(docker-machine ip ${1:-dev})
echo The machine ip is DOCKER_IP=$DOCKER_IP
}
docker-kill() {
docker-compose kill
docker stop $(docker ps -a -q)