Witch Bag

Archive: June, 2010

How to remove <p> tags added by WordPress

WordPress automatically converts your double line breaks into paragraphs. Here is how to disable this feature for all your posts.

Open these 3 files:

/wp-content/themes/yourtheme/index.php
/wp-content/themes/yourtheme/single.php
/wp-content/themes/yourtheme/archive.php

Insert the following below the line get_header();

// remove <p> tags automatically inserted by WordPress
remove_filter('the_content', 'wpautop');

For reference, see:

WordPress documentation on wpautop()
WordPress documentation on remove_filter()
WordPress documentation on the_content()

How to merge Full Tilt player notes

There’s an old program FTP Player Notes Manager which may not work currently. Merging player notes manually isn’t too cumbersome:

  1. Close Full Tilt Poker.
  2. Your player notes are located in
    C:/Program Files/Full Tilt Poker/username.xml

    (adjust for your install directory). Backup these files and put them in the same computer.

  3. Each player note takes up a line that looks like this:
    <NOTE PlayerId=”Valikoski” ColourIx=”7″ Text=”idiot from Northern Europe” />

    These are the lines that matter to us, and we will leave the other lines at the top and bottom of each file alone. We want to avoid having duplicate players notes in the same file. If you know there are no duplicates, then just copy and paste all the <NOTE /> lines from one file to the other. Otherwise, see Wikipedia’s list of file comparison tools and use one of those programs to compare your player notes files. Copy and paste the extra notes from one file to the other.

  4. I found that one of my files had its player notes in reverse order, so I had to use reverse the file before comparison. You can find another program to do this, or use the Linux command
    tac username.xml > reverse.xml
  5. Save the merged file as
    C:/Program Files/Full Tilt Poker/username.xml

    and you are done.

In Canada, chocolate milk comes in bags

Continue reading…

How to dual boot Fedora (under LVM) and Windows

I had Fedora 12 in a logical volume taking up all the space in my hard drive. Here is what I did to shrink the Fedora partition and create a new partition for Windows 7. I am not an expert so I had to google for solutions to each problem, and I did not find any guide that covers all the steps.

Continue reading…

Cryptonomicon chapter summaries

This is a chapter-by-chapter summary of Cryptonomicon by Neal Stephenson, intended for readers wanting to refresh their memory on previous chapters. The pages numbers are from the 2002 Avon Books paperback (ISBN 978-0-06-051280-4). It’s currently incomplete, with the second half of the book coming soon.

1 Prologue

28 November 1941, Shanghai. It’s a Friday afternoon, so the streets are crowded with coolies transporting boxes of bank bills. A boom from the river empties the streets of the coolies, but not the boxes and bamboo poles. Corporal Bobby Shaftoe of the Fourth Marines comes up with haikus for the event.

5 Barrens

A young Lawrence Pritchard Waterhouse figures that his church organ must be very complex to be able to produce such complex music, and learns all about its mechanics. He majors in mechanical engineering at Iowa State College and plays glockenspiel in the band. He gets a scholarship to Princeton and befriends Alan Turing, who is building a machine to calculate values of the important Riemann zeta function. Alan proposal to have sex with Lawrence is rejected. There’s a German guy named Rudy whom Alan has sex with. When the three of them take a bike ride to the Pine Barrens, Alan tells Lawrence about:

Alan thinks brains are Turing machines. Alan goes back to England and gets secret work. Due to his poor grades, Lawrence becomes a glockenspiel player in the Navy in Hawaii, but not before becoming published in a mathematical journal.

Continue reading…