Nerd Documents
Chinese Linux
Wednesday, April 2nd, 2008This can’t be good for GNU/Linux’s Image.
Creating a Screenshot from Ffmpeg
Tuesday, February 19th, 2008Using ffmpeg, to create thumbnails for flash video files you can use the following command
ffmpeg -y -i videofile.flv -f image2 -ss 12 -vframes 1 -an screenshot.jpg
I use this command to create the stills for the videos I embed using the Flash Media Player
Enabling PHP tags in MediaWiki
Wednesday, January 30th, 2008For internal Wiki’s for personal or small business use, it’s very useful to enable raw php. This of course, is a security nightmare so make sure you set it so that only people who have accounts can edit pages.
To prevent the creation of new accounts put the following into LocalSettings.php
$wgGroupPermissions['*']['createaccount'] = false; $wgGroupPermissions['*']['edit'] = false; $wgShowIPinHeader = false;
Then add this simple PHP tag parser to includes/Setup.php
function ParsePHPTag($Content)
{
global $wgOut;
$wgOut->enableClientCache(false);
ob_start();
eval($Content);
$Result = ob_get_contents();
ob_end_clean();
return($Result);
}
$wgParser->setHook('php','ParsePHPTag');
That tells Mediawiki to pass the <php> tag’s contents to the function ParsePHPTag which will execute the code.
I use it for advanced page building as well as simple hacks such as getting around some of the other filters with code like
<php>echo "<iframe src='somepage.php' />"; </php>
If you want your privacy, you can disable anonymous page views with the following inside of LocalSettings.php
$wgGroupPermissions['*']['read'] = false;
$wgWhitelistRead = array ("Special:Userlogin");
That disables anonymous viewing of all pages except the login page.
And finally, if for some reason you need TeX support for math symbols or neat graphs, you can enable it with a rather complicated process.
- Make sure you have LaTeX, dvips, and ImageMagick installed on the server. You also need machine with GNU Make and Ocaml
- Run make in the /math directory of MediaWiki on the system with Ocaml. This will build texvc. If you can’t get access to a machine with a build process, you can try this one which I built on dreamhost so it should work there. Drop it into your MediaWiki’s /math directory
- set $wgUseTeX to true in your LocalSettings.php
This should enable <math> tags inside of your MediaWiki, allowing you to create stuff like

Eclipse CDT debug error
Monday, December 31st, 2007If you get the error
A syntax error in expression, near `-console'.
mi_cmd_env_cd: Usage DIRECTORY
when trying to launch the debugger from Eclipse CDT, change your project and or path to not have any spaces in it. Apparently the debug launch code isn’t smart enough to put quotes around paths or escape spaces.
(On Ubuntu Gusty Gibbon)
Think Different
Sunday, September 30th, 2007The State of Linux Audio
Tuesday, July 17th, 2007Why Linux Audio Has Been a Mess for Years
And will likely stay that way.
Ubuntu 7.04 Feisty Fawn
Saturday, June 16th, 2007Everyone raves about Ubuntu and how it’s easy it makes everything. 7.04 garnered critical acclaim for being, “better, but not that different” which isn’t the greatest endorsement, but at least it’s an endorsement. I did 4 upgrades from Edgy (6.10) to Fawn (7.04). It was very simple, I just used the update manager and it updated all 4.
Unfortunately, of the 4 only 1 booted after upgrade. It took much finagling including a complete reinstall to get the other machines up to speed.
To me this does not bode well for Ubuntu.
The Hackintosh Project (osx86)
Sunday, November 12th, 2006
In which I chronicle the installation of Mac OS X 10.4.8 on a Dell.
(more…)
RSS Feed Reader
Monday, March 20th, 2006Because Danny Silverman is doing it, I decided to try out using an RSS Feed Reader to do my blog reading. I chose liferea based on some very minimal reading. Everything is kind of ugly and hard to read, but it will probably save some time.

Some notes, for Myspace RSS feeds, do:
http://blog.myspace.com/blog/rss.cfm?friendID=<friendID>
Where the friendID is a number that is in most links on their page.
For Xanga feeds do:
http://www.xanga.com/rss.aspx?user=<username>
That is, just replace home.aspx in the url with rss.aspx
Here’s hoping I never have to listen to 10 songs playing simultaneously when loading all my bookmarks
Muine
Tuesday, May 10th, 2005I’ve been exploring the neat mono apps that everyone has been raving about lately.
Muine is a very simple music player that “Just Works”. It works really fast and does mostly everything anyone would want in a music player. It’s not music management software, it’s just a player.
