Misc Matt | 16 Apr 2009
Manually Purge ColdFusion Client Sessions in Database
ColdFusion will purge your client sessions for you on a schedule. This schedule is dependent on when the CF engine starts. If your purge schedule is OK now, a CF reboot will set a new schedule and cause problems. if you use a database and your client variables table has hundred of thousands or millions of records, this can really kill performance.
I have disabled purge of client sessions in the CF Admin and do my purge during low load hours using a separate schedule.
I run 4 queries in a bash script. You can write a CF script to run these in windows or any other scripting language that let’s you connect to your client variable database.
Here’s the MySQL versions of the queries:
delete from CDATA where CFID in (select CFID from CGLOBAL where CGLOBAL.lvisit < date_sub(now(), interval 60 day));
delete from CGLOBAL where lvisit < date_sub(now(), interval 60 day);
optimize table CDATA;
optimize table CGLOBAL;
Optimizing your tables after the purge will clean up the empty space in your db file left now that those records are gone. This is helpful if you delete thousands of records at a time.
Misc Matt | 29 Apr 2008
ANSI OSHA Sign Goodness
Do you need to create an ANSI or OSHA compliant sign for your business.? St. Claire Inc. has a tool for you to build your sign and generate a PDF. Here’s an important notice I have displayed in the lab.

ColdFusion & Misc Matt | 11 Mar 2008
Eclipse Monkey Hard Word Wrap or Selection Wrap in Eclipse
The word wrap and selection wrap support in Eclipse leaves a bit to be desired. The biggest problem for me is that I can’t remember how to do even do it in a default install. I think there’s something in the editor config but it’s difficult to find and I always forget where it is.
I recently found this script for Wrapping Text using Eclipse Monkey. It’s some simple javascript that does hard wrapping around a certain number of characters per line. It pays attention to words and will insure that your lines never go beyond a particular column width.
This solution works for my particular needs of having to past in some content from Firefox into html files in Eclipse. Firefox doesn’t pay attention to the line brakes in the copying process so I end up getting some huge, ugly looking lines in Eclipse. For html output, the hard wrap of lines, with a return after each line is fine. If you’re using the CFEclipse plugin for Eclipse, there’s an icon in the tool bar that allows for soft wrapping of the text. This is really the best way to go for non-destructive wrapping. But that does assume you’re using CFEclipse and in that view. Outside of that, this script using the Eclipse Monkey plugin is a big help.
Eclipse Monkey, Project Dash is sweet. It basically allows you to build plugins into the Eclipse interface using javascript, offering clean menu integration and hotkey support right out of the box. I’ve spent all of 10 minutes thusfar with Eclipse Monkey, have installed this word wrap script and already have some other ideas of scripts I could pull off quickly.
Misc Matt | 18 Jan 2008
Flex Camp Chicago 2008
I’m at Flex Camp Chicago right now. Bob Tierney from Adobe is giving a keynote, reviewing some internal proof of concept flex apps. While Bob did not specifically mention this, he had an interesting New York Times article on his screen. This article, Airlines Work on Systems to Reduce Delays has an image of an application from American Airlines that is clearly a Flex app. That’s a pretty big name company using Flex, particularly for a publicly facing app.
Also this hasn’t been mentioned yet but I notice the Mate framework for Flex will be discussed at cfObjective this upcoming May by Laura Arguello. I haven’t been able to get my hands on this yet but it sounds interesting.
Misc & OS X / Unix Matt | 18 Dec 2007
I would watch Darth Vader make hash browns
Random post based on MacBreak ep. 70.
Thanks to Merlin Mann for the title, this should make it into his mannerisms (pdf). If you’re someone who would watch Darth Vader make hash browns, you’ll love the Star Wars Holiday Special from 1978. Holy smokes. This could very well be the most wonderfully horrible bit of video I’ve seen. Wow. Do a search for Star Wars Holiday Special on You Tube for clips. Or you can find the full special floating around usenet. Or if you’re campically challenged but still want to get in on the fun, check out this version from Rifftrax to have the humor explained for you.
Just ran across this list of OSX menu bar items. Great collection. The menu bar app, Caffeine was pointed out to me. This great little app allows you to disable and enable your energy saver settings with a single click. So basically you can be a good little monkey and use efficient energy saver settings most of the time but then if you need it, click the ZZZ in the menu bar to make sure your computer won’t go to sleep. If you give a presentation or watch a movie with your laptop unplugged, you know the annoyance of your screen shutting off or your screen saver coming on. I’ve enjoyed HimmelBar but don’t see a need for it in leopard with the stacks functionality. If you’re still using Tiger, check it out. iDiskMenu looks very cool as well as a menu app to mount and unmount webdav and ftp network shares. Unfortunately this doesn’t fire up in Leopard but it gets me wanting something to easily manage network shares. Also nfs support is a must for me. I’ll need to figure that out. Seems like a perfect job for the RixStep guys.
ColdFusion & Misc & Plesk & Server Architecture Matt | 29 Aug 2007
ColdFusion 8 and Plesk 8 on Red Hat ES 4
By default the Plesk control panel does not work with ColdFusion 8 yet. It sounds like official support will be available in Q1 of ‘08. I couldn’t wait that long. I’ve been able to get Plesk 8 to work with ColdFusion 8 to a degree.
I assume you’re familiar with how to install both separately so I’ll just be going over how to get both to play together.
In my world the Plesk control panel is just used simply used so that staff in our small software company can manage websites and not need to use a shell. No one else even has access to Plesk. Because of this, separation and security are not primary concerns. Also, I have no need to let anyone or myself manage CF DSN’s from within Plesk, being able to do this in CF Admin is fine.
So what I’ve done is enable the ColdFusion checkbox used when setting up a website so that CF code can be used on a particular website. Any ColdFusion management capabilities of Plesk are not enabled.
[root@yadda]# /usr/local/psa/bin/cfsetting -s /opt/coldfusion8
I/O warning : failed to load external entity "/opt/coldfusion8/runtime/servers/default/SERVER-INF/jrun.xml"
Config not parsed successfully.
Running that cfsetting command with the -s switch and the cf root from the commandline showed me an error plesk was running into. I found jrun.xml in a different place.
/opt/coldfusion8/runtime/servers/coldfusion/SERVER-INF/jrun.xml
Since I think jrun.xml should be pretty much the same from CF7 to CF8, I’m going to just try pointing Plesk to the right place with a simlink.
cd /opt/coldfusion8/runtime/servers/ && ln -s coldfusion default
Now I run the cfsetting command again.
/usr/local/psa/bin/cfsetting -s /opt/coldfusion8
Now I notice when starting up Apache that it’s trying to startup mod_jrun twice. In my ColdFusion install I selected to build a mod_jrun connector to hook into Apache during the install. Turns out that this conflicts with Plesk. It’s a simple fix. Just fire up your httpd.conf file and look for all instances of cfm or jrun. You should see these entries toward the bottom of the file. Just comment out the whole block of stuff by putting a hash sign in from of the lines. Or you could always delete this stuff if you want.
For each website that you enable ColdFusion support for you should see this code in the httpd.include file for the site.
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore /opt/coldfusion8/runtime/lib/wsconfig/psa/jrunserver.store
JRunConfig Bootstrap 127.0.0.1:51800
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc
If you need to do a little troubleshooting, just make sure that you don’t see code like this in any of the global config files for apache. As well make sure your jrunserver.store file exists. And make sure you’re loading the mod_jrun module somewhere. Plesk should drop this into zz010_psa_httpd.conf in the conf.d folder. Make sure that exists: LoadModule jrun_module /opt/coldfusion8/runtime/lib/wsconfig/psa/mod_jrun20.so. And lastly, double check your jrun.xml file you should see a mention of jrun broadcasting on port 51800 … you should see that in the jrun.servlet.jrpp.JRunProxyService block of the jrun.xml file. It’s possible that jrun is running on a different port, if that’s the case you’ll need to change it to 51800. Or somehow find out how to change the Plesk default.
If you have any troubles, post a comment here and I’ll see if I can help.
Misc Matt | 26 Jul 2007
ColorfulTabs for Firefox
A recent episode of dl.tv pointed me to the ColorfulTabs firefox extension. This extension simply colors the background of each new tab you open in a different color. The color palate is chosen from pastels that allow the black title text in the tab to show up well. At first when I installed it yesterday part of me felt like it was a gimmick. After using this for the day, I really enjoy it. When I’ve got a couple dozen tabs open, I’m able to find an older one with an obfuscated title name much quicker. That extra mental association with the color of the tab helps.
Misc Matt | 09 Jun 2007
Hello again world!
I’m converting usercore from BlogCFC. Now that my wife is going to start blogging and we’re going to co-write a blog for my daughter, I have seen it wise to chose a unified more polished platform with smooth edges, doilies and the like. Foof on … wordpress, here we come.
Misc Matt | 05 Jun 2007
Apple iPhone – 2 yr minimum
I was just taking a look at some of the new iPhone ads and noticed that a 2 yr minimum agreement is required for iPhones. Ouch. Of course the phone companies prefer you to sign on for 2 years but you’d think they’d give you a break for agreeing to that … not 2 years or blow.







