Black Rebel Motorcycle Club’s Howl and the Sony Rootkit

BRMC’s Howl is one of my favorite albums. I listen to it all the time. Mostly for the song “Ain’t No Easy Way Out”. I’m a sucker for acoustic rock songs, though I love the whole album. But I’d never recommend the album to any of my friends. Why? It could damage your computer.

Sony, in their never ending quest to punish their customers, put an auto-installing root kit on the CD. If you purchase the CD and listen to it on your computer the root kit will silently will install itself, phone home to Sony, hide all files that begin with ‘$sys$’, as well as cause occasional crashes and lockups. Attempts to remove the rootkit will disable your cdrom.

For more information check out this article. There was a class-action lawsuit against Sony because of the damage caused by the rootkit that was settled in 2005. But there’s still a ton of these CDs floating around out there so be careful.

But there’s hope! Now thanks to Amazon I can finally recommend this album to friends as a mp3 download. I recommend you give it a listen.

xorg.conf for IBM ThinkPad 1171 iseries

I’ve been setting up an old IBM laptop for my brother write papers and play freeCiv on. The Windows XP installation that was previously on the laptop had no problem displaying 1024×768 @ 60Hz, (and didn’t do much else, but that’s not what this article is about.) Once I installed Ubuntu the laptop would only display a small box at 800×600.

I spent a lot of time searching on Google for the magic line that would make the X server recognize this laptop monitor. There were a few other people on the internet that had posted questions about this, but there was either no answer or even more frustrating they had posted to their own questions “I figured it out” without any explanation. I knew it was possible, but I was just going to have to figure it out on my own. I had learned a few things during my search and this is how I finally got it working:

The first thing I did was back up my original xorg.conf by dropping into the terminal and typing this:

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup

Then I used gtf to generate a the code needed to tell X server to use 1024×768 resolution with a refresh rate of 60Hz:

gtf 1024 768 60

This gave me the code:

# 1024x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
  Modeline "1024x768_60.00"  64.11  1024 1080 1184 1344  768 769 772 795  -HSync +Vsync

which I pasted into my /etc/X11/xorg.conf under the “Monitor” section

Under the “Monitor” section I also pasted

 Option "PreferredMode" "1024x768_60"

I checked the log file in /var/log/Xorg.0.log and among the other information was the error “hsync out of range”. What I also noticed was that it was unable to determine the monitor type and was using defaults for the monitor hsync and vrefresh values.

The solution was to hard code hsync and vrefresh values that were outside the default range but that didn’t break X server and allowed for 1024×768 resolution. I did brake X server a few times trying to get the values right, but was finally able to boot into 1024×768 full screen.

Below is the xorg.conf that worked for me with the IBM ThinkPad iseries 1171

Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/lib/xorg/modules"
	FontPath     "/usr/share/fonts/X11/misc"
	#FontPath     "/usr/share/fonts/X11/cyrillic"
	FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
	FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
	FontPath     "/usr/share/fonts/X11/Type1"
	FontPath     "/usr/share/fonts/X11/100dpi"
	FontPath     "/usr/share/fonts/X11/75dpi"
	FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
	Load  "glx"
	Load  "record"
	Load  "dri2"
	Load  "dri"
	Load  "extmod"
	Load  "dbe"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
	Horizsync 47-48
	Vertrefresh 60
	# 1024x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
	Modeline "1024x768_60"  64.11  1024 1080 1184 1344  768 769 772 795  +HSync +Vsync
	Option "PreferredMode" "1024x768_60"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: : integer, : float, : "True"/"False",
        ### : "String", : " Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "AccelMethod"        	# []
        #Option     "SWcursor"           	# []
        #Option     "PciRetry"           	# []
        #Option     "NoAccel"            	# []
        #Option     "SetMClk"            	#
        #Option     "MUXThreshold"       	# 
        #Option     "ShadowFB"           	# []
        #Option     "Rotate"             	# []
        #Option     "VideoKey"           	# 
        #Option     "NoMMIO"             	# []
        #Option     "NoPciBurst"         	# []
        #Option     "MMIOonly"           	# []
        #Option     "CyberShadow"        	# []
        #Option     "CyberStretch"       	# []
        #Option     "XvHsync"            	# 
        #Option     "XvVsync"            	# 
        #Option     "XvBskew"            	# 
        #Option     "XvRskew"            	# 
        #Option     "FpDelay"            	# 
        #Option     "Display1400"        	# []
        #Option     "Display"            	# []
        #Option     "GammaBrightness"    	# []
        #Option     "TVChipset"          	# []
        #Option     "TVSignal"           	# 
	Identifier  "Card0"
	Driver      "trident"
	VendorName  "Trident Microsystems"
	BoardName   "CyberBlade/i1"
	BusID       "PCI:1:0:0"
	Option      "CacheLines" "768"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
		Modes "1024x768_60"
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
		Modes "1024x768_60"
	EndSubSection
EndSection

Converting arrays, structures, queries, and components to XML in Coldfusion

Back in 2008 I needed a way to convert mixed CF data into XML documents. I had seen Ray Camden’s “toXML” script, but the functionality was too limited for me. I had to write my own from scratch that not only gave me full control over the creation of the XML document, but also allowed me to send in all of the Coldfusion datatypes, including cfc components. The results was AnythingToXML.

Example Code:






#myXML#

The results would look something like:



    Doll
    $10.00


    Game
    $16.00


    Puzzle
    $12.00


If you structure your data and then pass it to AnythingToXML along with the optional Root Node name and optional list of XML attributes. AnythingToXML will convert your data to a complex and well-formatted XML documents. It will accept any combination of Arrays, Queries, Structures, Objects, and Simple Types as input.

Future upgrades include adding schema and namespace support.

You can download AnythingToXML Here
More Examples of using AnythingToXML are Here

WordPress Source Code Syntax Highlighting for Coldfusion

If I’m going to blog about code, I need a good syntax highlighter for WordPress. Searching through the many plug-ins available its obvious that there are really only two choices: Plugins that use Google’s Prettify and Plug-ins that use GeSHi.

I first tried the “Google Syntax Highlighter for WordPress” plug-in only to find that it doesn’t do Coldfusion. I downloaded someone’s plug-in for Google’s plug-in that would do Coldfusion Syntax highlighting only to have it start breaking the page layout. There was also a noticable slow down in the page loading. I gave up after spending my morning trying to get this to work.

The next plug-in I tried was “WP-Syntax” which is based on GeSHi. Not only did it support Coldfusion right out of the box, but it worked perfectly the first time I used it! If anyone else needs Coldfusion Source Code Syntax Highlighting for WordPress I highly recommend checking out the “Wp-Syntax” plug-in.

Example:
(Code box begins with <pre lang=”cfm”>)


The other plug-in you’ll probably need is the “Raw-HTML” plug-in. This will help keep WordPress from being helpful and scrambling up your code. Unfortunately this doesn’t solve the issue of switching between the HTML tab to the Visual tab. If you do that WordPress will still eat your code.

Hello World!

I’m a web developer and musician. In this industry it seem like most web developers are. I could get full band together with my co-workers.

I program mostly in PHP and Coldfusion. I dabble in C++, Linux, & Music Production.

After much prodding from RabidGadfly and Kristian Hermansen I’ve started this blog to record all the junk thats floating around in my head. I’m no expert, but its possible that some of the things I’ve learned and resources I’ve found could be useful to others.

Besides: everyone else and their grandma has a blog so its time I have one too.