Turn off WordPress trackbacks. For good

There are several ways to stop these pingbacks, 95% of which are spam. My method may not be optimal, but has the elegance of simplicity. Simply edit the part in the end of wp-trackback.php (at WordPress’ root directory) going if ( !empty($tb_url) && !empty($title) ) { header(‘Content-Type: text/xml; charset=’ . get_option(‘blog_charset’) ); if ( !pings_open($tb_id) [...]

WordPress: Displaying C-like hexadecimal prefix “0x” correctly

This is a small, but annoying thing about WordPress. They obviously didn’t consider the “0x” hexadecimal notation. What they did consider, was that if someone says “2x2″ that surely means “2 times 2″, so why not making that “x” in the middle fancy? Well, maybe because that makes “0x123″, which is a hexadecimal number, look [...]

Random notes about git

Merely for myself, so I’ll remember how to do it. If I’m doing stupid things, please comment below. Rule #1 If you’re about to do anything with git being unsure about the consequences, always protect yourself with $ git branch bettersafe $ git commit -a $ git checkout whatever Assuming that you want to mess [...]

Perl-only CRC32 function (without C code)

It may look like a stupid idea, since the CRC32 has been implemented in some Perl modules which can be downloaded from CPAN. But all functions I found involve an XS part, which essentially means that a compilation of C code has to take place during the installation. In other words, these modules can’t be [...]

Xilinx’ XST synthesizer bug II: Inferred RAM and mux

It looks like inferring RAMs and ROMs is the weak spot of XST. This is the second bug I find using this synthesizer, this time on XST M.63c, coming with ISE Release 12.2. The previous bug was ROM creation from a case statement. But hey, that was two years ago. This time I the code [...]

Cygwin: rm is actually move to Recycle Bin

This one really pissed me off. I installed Cygwin recently on an XP machine. All kinds of .cyg000(mumbo jumbo) directories started to show up, and I had no idea why. Then I got it: The rm command in recent Cygwin (versions > 1.7?) is “friendly”: Rather than unlinking the files, they are moved to a [...]

Thunderbird: Recovering corrupt address book

It all started with a blue screen (Windows, right?), which seems to have something to do with Firefox. Anyhow, after that crash Thunderbird told me it can’t open the abook.mab file, and hence my contacts are lost. Which means it won’t autocomplete email addresses as I type them, which I’m not ready to take. The [...]

Cleaning up duplicate notes on LMMS

Since certain keystrokes can copy notes on exactly the same position where there are already exactly the same notes, it so turned out, that I had some 6-7 identical notes overlapped in certain time slots. This condition is invisible in the GUI editor unless you try to move notes, just to find that there’s still [...]

Video encoding. Some useful command lines

This is just a few command lines I use every now and then. Just so I have them when I need them. Convert a lot of Flash Video files to DIVX, audio rate 128 kb/sec mp3: for i in *.flv ; do ffmpeg -i “$i” -ab 128k -b 1500k -vcodec mpeg4 -vtag DIVX “${i%.*}.avi” ; [...]

Cinelerra: When YUV4MPEG fails with mencoder

Somewhere in the region of version r31061-4.4.3, a bug in mplayer and mencoder made the program not cache properly. This causes issues when trying to play streams, or when rendering an edited video in Cinelerra in YUV4MPEG-to-pipe mode. The common behavior during rendering is that mencoder quits immediately or very soon, because it thinks end-of-file [...]