Archive for December, 2008
Free your memory on Linux

No, this is not a howto to make your RAM Stallman-compliant.
Sometimes, it is handy to empty your caches, like when Virtualbox checks the available memory before actually starting. From linux 2.6.16 there are some nice tricks for dropping the memory cache, dentries and inodes.
First of all, we need to free all the cached objects.
Run as root:
syncThen, to free pagecache:
echo 1 > /proc/sys/vm/drop_caches
To free dentries and inodes:
echo 2 > /proc/sys/vm/drop_caches
To free pagecache, dentries and inodes:
echo 3 > /proc/sys/vm/drop_caches
Now, check your available memory using free and all your cache are belong to us.. *hu-uhm* ..should have been freed. Freed as in freed-om
IPsec, AH & Microsoft

“At one of the final IETF meetings before AH and ESP were finalized, someone from Microsoft got up and gave an impassioned speech about how AH was useless given the existence of ESP, cluttered up the spec, and couldn’t be implemented efficiently (because of the MAC in front on the data).
Our impression of what happened next was that everyone in the room looked around at each other and said, “Hmmm. He’s right, and we hate AH also, but if it annoys Microsoft let’s leave it in, since we hate Microsoft more than we hate AH.”
From “Network Security: PRIVATE communication in a PUBLIC world“.
Installing Python 3 on Mac OS X Leopard

It’s a long time (almost a month!) I don’t write here anymore, but I’ve come back to teach you how to install Python 3.0 with readline support on Mac OS X 10.5 “Leopard” (incidentally I bought a Macbook
)
- Download the latest readline from the GNU readline homepage.
- Extract it in a folder.
- Download all the patches available here and save them in the same folder.
- Open Terminal and enter in that folder.
- Apply all the patches by running:
patch -p0 < patch_file_name
For example:
patch -p0 < readline52-001 patch -p0 < readline52-002 patch -p0 < readline52-003
- Configure, make and install:
./configure make && sudo make install
- Download the latest Python 3 release from here.
- Extract it and navigate to the folder with Terminal.
- Configure it by running:
./configure --enable-framework --with-readline-dir=/usr/local
- Compile and install it:
make && sudo make frameworkinstall
Here you go!