Archive for December, 2008

 

Free your memory on Linux

posted by Arkham on December 19th, 2008

stallman_young

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:

sync

Then, 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 ;)

Tags: ,

IPsec, AH & Microsoft

posted by Arkham on December 17th, 2008

steve_ballmer

“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“.

Tags:

Installing Python 3 on Mac OS X Leopard

posted by Arkham on December 6th, 2008

python

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 :P )

  1. Download the latest readline from the GNU readline homepage.
  2. Extract it in a folder.
  3. Download all the patches available here and save them in the same folder.
  4. Open Terminal and enter in that folder.
  5. 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
  6. Configure, make and install:
    ./configure
    make && sudo make install
  7. Download the latest Python 3 release from here.
  8. Extract it and navigate to the folder with Terminal.
  9. Configure it by running:
    ./configure --enable-framework --with-readline-dir=/usr/local
  10. Compile and install it:
    make && sudo make frameworkinstall

Here you go! :D

Tags: , , ,