RewriteEngine On RewriteRule ^(.+)\/abc\/(.+)$ $1\/xyz\/$2So http://blah.com/abc/image.jpg becomes http://blah.com/xyz/image.jpg
Wednesday, April 25, 2012
Change Folder Name Using mod_rewrite
For anybody out there that may be needing to do a simple directory name replacement using mod_rewrite:
Tuesday, April 10, 2012
Outlook Messages with Word Attachments
I hate getting emails at work with Word attachments. It just takes too long to open the attachment especially when the content could have been easily included in the message. Let's make a pact that any time we have a meeting agenda, job posting, etc. that has minimal formatting, we will copy and paste it into the message instead. Outlook is smart enough to know what to do with it (most of the time) and it will save everybody some time.
Friday, April 6, 2012
jQuery Newbie Mistake
I just made a jQuery newbie mistake but the worst part about it was that the code still worked in all browsers...except IE7. So I didn't even know that I had done it wrong until one of the developers discovered it.
Here is what I tried to do:
Here is what I tried to do:
Here is what I should have done:
$("blah").each(function(index) {
this.id = newID;
this.name = newID;
});
Once I changed my code to the latter, it starting working correctly in IE7.
$("blah").each(function(index) {
$(this).attr("id", newID);
$(this).attr("name", newID);
});
Labels:
jQuery
Thursday, April 5, 2012
Using Color to Prevent Accidents
We are all familiar with the use of color for keeping our attention: stop lights, construction signs, warning labels, etc. To try to minimize the number of mistakes I make, I color code my terminal sessions.
On Windows I use PuTTY for creating a secure shell session into the servers that I need to access. One of the options it to set a background color for the session.

For production I set the background color to red and for development I set the background to green. The red color is a warning to myself: "You are on the production server. Don't screw things up!" Then for each server I log into, I save a session, and create a shortcut to it. In PuTTY the syntax is putty.exe -load "session_name". For example:
c:\putty.exe -load "dev"
c:\putty.exe -load "prod"
Color can't fix my stupid mistakes, but it has helped me to stay focused.
On the topic of color, I just read this article on Wired.com about how red keeps you focused and blue makes you more creative. Next step is to use Firefox Personas to color code my Firefox windows: red for coding and blue for designing.
On Windows I use PuTTY for creating a secure shell session into the servers that I need to access. One of the options it to set a background color for the session.

For production I set the background color to red and for development I set the background to green. The red color is a warning to myself: "You are on the production server. Don't screw things up!" Then for each server I log into, I save a session, and create a shortcut to it. In PuTTY the syntax is putty.exe -load "session_name". For example:
c:\putty.exe -load "dev"
c:\putty.exe -load "prod"
Color can't fix my stupid mistakes, but it has helped me to stay focused.
On the topic of color, I just read this article on Wired.com about how red keeps you focused and blue makes you more creative. Next step is to use Firefox Personas to color code my Firefox windows: red for coding and blue for designing.
Labels:
tips
Friday, March 9, 2012
Quickly Filing Email in Outlook
I used to keep a ton of folders in Outlook. Any time I would file away an email, I would have to decide which folder it went in, scroll to that folder, and drop it in. But what if it belonged to more than one folder?
I finally found a great solution in Taglocity. Now whenever I get an email, I just hit Ctrl-T, tag it with one more tags, then file it into a folder called "Archive". Then if I need to find something, I just go to my Archive folder and filter by one or more tags.
By the way, I am not being paid to endorse any of these products (although I wish I were.) When I found a time-saving utility or process, I just like to share it with others.
I finally found a great solution in Taglocity. Now whenever I get an email, I just hit Ctrl-T, tag it with one more tags, then file it into a folder called "Archive". Then if I need to find something, I just go to my Archive folder and filter by one or more tags.
By the way, I am not being paid to endorse any of these products (although I wish I were.) When I found a time-saving utility or process, I just like to share it with others.
Thursday, March 8, 2012
Fast Application Access on Windows XP
It used to be that anytime somebody saw my laptop screen at work, they would joke about the number of icons in my Quick Launch toolbar. I had 2 rows of icons followed by a row of shortcuts. Although it was organized (Office products, developer tools, Internet apps, graphics, etc.), it did seem a bit overwhelming. So after purchasing my first Mac recently, I decided to look for an equivalent app to the Finder feature of OS X.
I discovered this gem:
It sits just about my system tray and using various "Magic Words", I can start up any of those apps that I had bookmarked before. And with auto-complete goodness, it's rather fast. I have now eliminated my Quick Launch toolbar altogether.
Now supposedly having a lot of icons doesn't slow down your computer, but I have noticed an increase in performance since I got rid of the Quick Launch bar. I think having shortcuts to a bunch of networked drives was causing a performance hit.
Best of all it's a free app. They just ask you to shop Amazon using the provided link.
I discovered this gem:
It sits just about my system tray and using various "Magic Words", I can start up any of those apps that I had bookmarked before. And with auto-complete goodness, it's rather fast. I have now eliminated my Quick Launch toolbar altogether.
Now supposedly having a lot of icons doesn't slow down your computer, but I have noticed an increase in performance since I got rid of the Quick Launch bar. I think having shortcuts to a bunch of networked drives was causing a performance hit.
Best of all it's a free app. They just ask you to shop Amazon using the provided link.
Monday, March 5, 2012
My Essential Firefox Plug-Ins
The more I do Web development, the more I wonder how I ever built any applications without Firefox and its many plug-ins. Here are my essentials:
Firebug
I'm sure I'm not taking advantage of all the great features of this plug-in. As I do more and more jQuery development, the JavaScript console has become a necessity. Also great for debugging AJAX. The inspector is great for working CSS issues.
MeasureIt
Simply drag out a rectangle out the screen and you can instantly get the dimensions of any object on the screen.
ColorZilla
Found a color on the screen that you need? Use the dropper to find it, then right-click the picker to copy the color code in various formats (hex, rgb, hsl).
Live HTTP headers
This plug-in will show you all of the HTTP headers during a page load. I once used this tool to figure out that the reason a particular page was broken was because a key element being included was blocked by the company firewall.
Web Developer
Drop down menu includes: Disable, Cookies, CSS, Forms, Images, Information, Outline, Resize, Tools, and more. Let's you do all sorts of manipulation for debugging Web development.
What about you? What are your "must haves"?
Firebug
I'm sure I'm not taking advantage of all the great features of this plug-in. As I do more and more jQuery development, the JavaScript console has become a necessity. Also great for debugging AJAX. The inspector is great for working CSS issues.
MeasureIt
Simply drag out a rectangle out the screen and you can instantly get the dimensions of any object on the screen.
ColorZilla
Found a color on the screen that you need? Use the dropper to find it, then right-click the picker to copy the color code in various formats (hex, rgb, hsl).
Live HTTP headers
This plug-in will show you all of the HTTP headers during a page load. I once used this tool to figure out that the reason a particular page was broken was because a key element being included was blocked by the company firewall.
Web Developer
Drop down menu includes: Disable, Cookies, CSS, Forms, Images, Information, Outline, Resize, Tools, and more. Let's you do all sorts of manipulation for debugging Web development.
What about you? What are your "must haves"?
Labels:
AJAX,
Development,
Firefox,
jQuery