Skip to content

Instantly share code, notes, and snippets.

@greggyNapalm
greggyNapalm / gist:2282242
Last active May 9, 2022 07:26
TCP/IP stack linux
# increase system IP port limits
net.ipv4.ip_local_port_range=1024 65535
# Incoming packets queue length
net.core.netdev_max_backlog=10000
# TCP socket max connections num
net.core.somaxconn=262144
# Enable syncookies
@hrldcpr
hrldcpr / tree.md
Last active January 24, 2026 21:18
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@greggyNapalm
greggyNapalm / python_workbench_mac.rst
Last active November 7, 2015 15:09
python dev env; mac os
@greggyNapalm
greggyNapalm / vim_install_from_source
Created March 3, 2012 08:57
vim install from source
hg clone https://vim.googlecode.com/hg/ vim
cd vim/src
./configure --prefix=/opt/vim --enable-pythoninterp --enable-cscope --with-features=huge --with-tlib=ncurses
make
@greggyNapalm
greggyNapalm / gist:1862955
Created February 19, 2012 10:15
rmv; linux
rvm get latest
rvm reload
rvm rvmrc trust
rvm install ruby-1.9.3-p0
rvm rubygems latest