Skip to content

Instantly share code, notes, and snippets.

Tran Viet Hoang hoang-tranviet

  • INGI, UCLouvain
  • Belgium
Block or report user

Report or block hoang-tranviet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View NS3 DCE iptables
wget http://www.netfilter.org/projects/iptables/files/iptables-1.4.21.tar.bz2
tar xf iptables-1.4.21.tar.bz2
cd iptables-1.4.21/
./configure LIBS="-pie -rdynamic" CFLAGS="-fPIC -U_FORTIFY_SOURCE" --with-xtlibdir=/lib/xtables --disable-static
make
readelf -h iptables/.libs/xtables-multi | grep Type:
git clone http://github.com/richardwithnell/iptables
cd iptables/
@hoang-tranviet
hoang-tranviet / latency.markdown
Created Oct 9, 2016 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know
View latency.markdown

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns  = 250 µs
@hoang-tranviet
hoang-tranviet / purge.sh
Last active Jan 6, 2017 — forked from adrienbrault/purge.sh
Script to reduce VM size before packaging for vagrant
View purge.sh
#!/bin/bash
# Credits to:
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
aptitude -y purge ri
aptitude -y purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide
aptitude -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30
aptitude -y purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5
View gist:3bded4d89f547899db5a384711e7b55f
# basic pfctl control
# ==
# Related: http://www.OpenBSD.org
# Last update: Tue Dec 28, 2004
# ==
# Note:
# this document is only provided as a basic overview
# for some common pfctl commands and is by no means
# a replacement for the pfctl and pf manual pages.
You can’t perform that action at this time.