Words about stuff, and things related to stuff

Add index.cfm as default doucment in .htaccess

Simple tip: Add this line to your .htaccess file

view plain print about
1DirectoryIndex index.cfm

This tells the server to default to /index.cfm inside of any directory.

Why I needed it: I just installed Mura CMS on a Railo/cPanel server where index.cfm is not set as a global default document, and the mura admin kept redirecting me back to the home page. I just added that line to the .htaccess in the web root, and we're good to go.

Adobe Edge Inspect mobile device preview

As part of a google groups thread about putting a Bootstrap skin on this blog, and a question about testing mobile devices, I found this useful little link on Charlie Arehart's list of Page Appearance Testing Tools:

 Adobe Edge Inspect, free, allows devs "to preview their content across multiple mobile devices. Wirelessly pair multiple iOS and Android devices to your computer, grab screenshots from any connected device, and see real-time results from changes to HTML, CSS, and JavaScript." 


File Locator Lite

As part of his presentation " CF911: Solving Frequent CF Server Problems in New/Better Ways ", Charlie Arehart showed a series of examples, searching CF log files with impressive speeds. He mentioned the tool that was being used, File Locator Lite and gave it a great review. Anything that is two thumbs up with @carehart is generally worth checking out.

Today I got tired of Notepad++ text search, which is great but seems to just quit working at random times, and just didn't feel like using Eclipse. So I downloaded and fired up File Locator and bam! it is just what I needed. The link above has examples and screenshots so I won't bother here, but all the options I could think of are visible at first glance, and it does what it says... locates files, fast and light.

Tell Github to ignore folders with .gitignore

Use simple rules in your Github project's .gitignore file to keep out the clutter!

view plain print about
5## ignore directory where name matches string
8## ignore specific folder by name
11## ignore folder capitalized or not
14## ignore backup directories (root.bak, etc)

More at https://help.github.com/articles/ignoring-files

Enforce 'www' prefix with .htaccess

On our Windows/ColdFusion servers at www.gowesthosting.com we run Helicon APE (and on our older servers, ISAPI Rewrite, also by Helicon) which lets you use standard Apache .htaccess files to create rewrite rules for any website. 

Here are a few quick useful snippets for rewriting any URL to include the 'www' prefix. This is good practice, preventing the 'duplicate content' penalty from Google which can occur when a site is available under two addresses, as well as forcing consistency to visitor sessions. This is especially critical in eCommerce sites where a user's session may not be persisted when jumping from a 'www' to 'non-www' page. 


RewriteEngine on
rewritecond %{http_host} ^domain.com [NC]
rewriterule ^(.*)$ http://www.domain.com/$1 [R=301,nc]

just replace "domain.com" with your actual domain, and you should see http://yoursite.com/ gets redirected to add the 'www' prefix automatically.

TIP: be sure to use the 'www' anywhere you link to your site, or when connecting any third-party services like PayPal, since a form 'post' from any external source will not be persisted if the page gets redirected. 


Tools to Live By: ClearContext plug-in for Outlook

I've used MS Outlook for a few years now, as part of my GTD-ish system for tracking tasks, appointments, and of course email messages. After quite a while of using a tricked-out routine using some variations on the built-in outlook categories (those colored dots that outlook lets you tack onto any message, task or appointment), along with the usual gazillions-of-folders for projects, customers, billing, personal messages and every other possible categorization of outlook info - all managed by clicking and dragging messages and tasks here and there - I went looking for a better solution... and I am so glad I did.

Enter "Clear Context" from http://www.clearcontext.com/ - this little add-in makes such a big difference to my day. While it boasts a long list of features ( see the user guide, here: http://www.clearcontext.com/user_guide/ ), I'll touch briefly on the ones I use the most, and let you see for yourself why i am so excited about this tool.

1) Folders as 'projects'. ClearContext analyzes your Outlook folders and uses those as the basis for what it calls 'projects'. The entire application runs based on those folders - replacing outlook's somewhat limited category options with a limitless number of options for filing. When i get a new client or project, i create a folder, and once i've put a message from a client in that folder, CC 'suggests' that future messages from the same person go there as well. Unlike regular message folders, these same project/folder names are applied to your tasks, and CC's easy 'dashboard' view lets me see all messages, tasks, attached files and contact information for anything in that folder or related to that 'project'.

2) Put stuff where it goes with keyboard shortcuts, and smart suggestions. With any message highlighted, i can hit ctrl+shift+m for an intuitive list of likely folders where this message belongs (ClearContext gets to know who you put where and suggests it back to you, becoming more accurate as time goes on). So, without taking my hands off the keys, i can file an entire day's worth of email in a matter of seconds. This is big, and the way it works is super slick.

3) Defer / Unsubscribe. These are two separate features but both of them serve the same purpose - getting things out of your face that you don't want to see! With a single click i can 'defer' any message for a set number of hours or days, or until a set time and date - it is removed from view, and at the set time, it comes back to my inbox as a new message. So, if stuff piles in for 'later' while i am working on correspondence for 'now', i can defer everything else until i am ready to deal with it, and don't even have to look at it until then. 'Unsubscribe' uses the message subject to create a rule which puts all messages using that same subject line into a special folder 'clear context deferred', which i look at and then empty to deleted items every few days. This is also huge - repeat emails, junk alerts, group messages where i am bcc'd but really don't need to be - they all go away, never to be seen, clicked or managed again (unless i want to ... then they are easy to find) 

4) Tasks from messages. More keyboard shortcuts, or a click on a single toolbar icon, allows me to create an outlook 'task' from any message. Even if I file or delete the email message (which i often do, once a task is made) , CC saves a task with the due date i specify, and the email text as the body of the message, with the original message attached. This makes it uber-easy to look through my to-do list , by category, and see what needs to be done. If i mark the task complete, or delete it, the original message is still where i put it, for future reference, without the need to refile it from 'to do' to the project it belongs to. This is incredibly useful for the way i work, and the way i use Outlook.

5) Do not disturb. Turns off auto send/receive for a limited time, and hides the 'you have mail' icon along with any sounds related to same. Click that, leave me alone, I am working.

6) Follow-up. When sending any message, there's an easy option to 'follow up'. This creates an automated alert, again at a time and/or date i specify, which is automatically cancelled when somebody replies to the message (lots of options there for who must reply to cancel the follow-up, etc) . If i send off a proposal (or even more importantly, a bill) and want to make sure the client receives it , I simply click the follow-up button and can put the whole thing out of mind. If the client replies, the alert is cancelled - if they don't, i get reminded to follow up. Super simple, super useful. 

Overall, my goal is to keep things organized and my inbox empty so i don't have to think about any of it. By making easy to file and find all email messages, tasks and other important 'to do' data, I can free my 'mental RAM' from carrying those things around, and focus on whatever i am doing at the time. (Now, what was I doing... ?)

If you use Outlook's tasks, or file your messages by folder, or just like to keep your inbox clean, I suggest you take a test drive (30 day free trial, $89.95 to buy w/ money-back guarantee) of this super useful, well-maintained and carefully implemented add-in. 
You can also check in with other users in the active, well-supported Clear Context forums: http://online.clearcontext.com/forums/  to find how it can help you get more done.



When Alt+Tab just isn't cutting it: VistaSwitcher!

Any PC user who likes keyboard shortcuts knows about the Alt + Tab combination built into  all recent versions of Windows. It has been improved in recent versions, and the visual options and speed in Win 7 are pretty good... but not good enough.

That's where VistaSwitcher comes in - I just found this little app, and it is instantly part of my workflow, providing a more visible, more intuitive way to switch between open programs or documents.

From the description:


Alt + Tab Switch between ALL open windows
Alt + ` (Backtick) Switch between open windows of a single application (for example, MS Word documents or Explorer folders)

Also, you can switch between open windows with only the mouse. No keyboard shortcuts required! Just hold your right mouse button down and scroll the wheel up or down to select the window you want.

Check it out here:


HTML Formatter ColdFusion-friendly code cleanup tool

No matter how clean your code, there's something to be said for a fast, clean pre-launch cleanup with a reliable code formatter . My favorite by far is the HTML Formatter from LogicHammer.com:  http://www.logichammer.com/html-formatter/

Complete with a full set of ColdFusion-friendly options, this simple tool makes cleaning your code a snap. I use it as I'm working, to clean up the work-so-far at any point, and before final launch to make sure the production code will be as easy as possible to maintain and revisit later on. It is a standalone executable, which means there's no installation, and you can put in anywhere you like on your hard drive.

I simply create a taskbar shortcut on my Windows PC and drag the files I want to clean directly from the 'project' view in Eclipse onto the icon - couldn't be faster, simpler or easier. I prefer to have my original files altered, with the originals automatically put in a specified backup location - you can also assign the option to leave the original alone and create a cleaned-up copy.

Among other fav features, HTML Formatter ships with a simple text-based config file which makes it incredibly easy to specify tags to ignore or to indent, and file extensions to be formatted or skipped ( you can run the formatting on specific files, or an entire directory).

For only $14.99 you get all the features and 2 years of updates (there is also an 8.99 version with a basic feature set). The program's developer has answered every question I ask directly and has been very helpful with customizations, even building in some features I requested a while back (for the record - I'm not affiliated with logichammer in any way, just very pleased with this slick little tool).

Keyboard Shortcuts I use all the time


Win + Arrow left/right: 
snap open window to 1/2 monitor frame

Win + Arrow up/down: 
up: full screen (maximize window)
down: restore / minimize

Alt + F4:
Exit program / close window

Win + D:
Show desktop


Eclipse (w/ CFeclipse)

Ctrl+Alt+Up/Down arrows
Duplicate line

Alt+Up/Down arrows
Move line

Alt + F > A
Save as

Ctrl + Shft + R
Open file w/ search by name


New Tab

New  Window

Inspect Element (Firebug)

Display Element Information (Web Dev Tools)

Close window (close all tabs)

Close current tab

Installing SQL Server 2008 Management Studio Express

I don't do much work on MS SQL, but a recent project requires I connect to a remote SQL 2008 database, so I went looking for the new version of the SQL Server Management Studio Express program which has worked so well, and so simply, for SQL 2005 databases.

Simple enough, right? Not quite. It didn't take me long on Google to realize i was far from the only one having trouble installing just the Management Studio, without the server components. Microsoft has managed to make this process incredibly unintuitive, including links and download pages which don't actually point you to what you think you are getting.
( for examples, see the google link above... i'm being really nice in this post by comparison!)

The best compromise i could find was the official MS download page, which offers a 160+mb file containing the full database server system. Blog posts mention compatibility issues (Win7 did throw up some warnings of its own when i started the process, so i backed out and kept looking), incomplete installations and the need to run the installer twice so you can 'add' the Management Studio as a component to an existing installation.

Huh? Exactly.

So, anyway...  for those that might be in the same plight... I have the solution!

Go here: http://www.microsoft.com/web/Downloads/platform.aspx and install the MS 'Web Platform Installer'.  Then, when the installer loads up, find the little 'customize' link under the "Database" section, where you can tick the boxes for the components you want to install. ( see image )

Once i got it going, this was actually a slick little installer.
(So finally I have SQL 2008 Management Studio ready to go.
Now, what was i going to use it for?)


A whole new Outlook

I depend on Outlook 2007 in a number of ways but it has been kludgy, memory-hoggish and recently, a dead weight on anything else that was running at the same time. Granted, I have a massive storage of email and use the heck out of tasks, but still, it should work once things get loaded. Today I got fed up with the freezes and did some investigation.

I am happy to report I found what seems to be a magic tonic, restoring the Outlook I used to like!

The cause was apparently an "Add-In", and the slowness is a common symptom. I won't go into all I read about Outlook Add-ins here, but it is a little subculture all its own.

The cure, for me, was as easy as disabling all Outlook add-ins... once I found where and how (it is not obvious!)

1) To do this in Vista, you have to be running Outlook as an administrator . (right click on Outlook.exe, select 'run as administrator')

2) Once Outlook starts up, go to Tools, then Trust Center

3) In the Trust Center window, select 'Add-Ins' - you'll see a list of Add-Ins, and below that a select box labeled "Manage:"  Select "COM Add-ins" and click "Go", to bring up the window where you can actually Manage your Add-ins. ( They must over-engineer this on purpose. 1 out of 10 for intuitiveness, MS!)

4) In the Add-Ins window, you can uncheck the box for any that you want to disable. I unchecked them all, not seeing a darn thing there I thought I might ever need. ( And surprised at the number of things that allow themselves to 'talk' to Outlook behind the scenes)

5) Save, OK and otherwise Exit your way all the way out, close Outlook and if you like , reboot your computer.

6) Launch Outlook again like always, and marvel at the speed. Seriously, this made a *huge* difference!






Recent Comments

Log in a Mura user programmatically with loginByUserID()
Michael Evangelista said: @Sebastiaan, assuming you have a user bean loaded at some point of your process, you can add them t... [More]

Log in a Mura user programmatically with loginByUserID()
Sebastiaan said: Hi Michael, Question: what if I have a site set behind a login and content is for member groups onl... [More]

Filezilla - open site manager or a specific site connection on startup
ggibby said: Took me some tinkering to discover that there should be NO quotes around "0/myftpsite" May... [More]

Feed Unavailable