If you have used VIM 7 for writing code, you may have noticed a new feature whenever your cursor is on a parenthesis, it highlights the matching parenthesis. Unfortunately, it can be confusing as to which paren your cursor is really on, especially if you are switching back and forth with the “%” command. Since it can be quite time consuming to sort through all of VIM’s configuration options, I thought everyone could benefit from this information. Who doesn’t use VIM, anyways?
Friday, September 28, 2007
Saturday, September 22, 2007
This is a good list of diagraming software.
Below are the most impressive ones:
Saturday, September 22, 2007
It’s nice to see that the Ubuntu community is making it easy to request backports of new software releases for older versions of Ubuntu.
Thursday, September 13, 2007
I am happy to see that Postgres 8.2 has a new RETURNING keyword for INSERT statements, which means that you no longer need to make a separate query to retrieve the auto-assigned primary key for the row you just inserted.
Also, PostgreSQL benchmarks are looking better all the time.
Sunday, September 9, 2007
This is an interesting exploit using DNS rebinding to circumvent the same-origin policy in browsers that normally prevents a malicious web page from connecting to other computers behind your firewall.
Sunday, September 9, 2007
If you install Windows XP on a partition of your Mac using Bootcamp, VMWare Fusion should see it, and allow you to boot Windows inside the VM. I installed Ubuntu Feisty on another partition of my Mac, so VMWare Fusion doesn’t notice it automatically, but I finally found out how to get Ubuntu running in the VM without requiring a second installation with a separate VMWare disk image.
Sunday, September 9, 2007
I just finished migrating my blog from blojsom 2.27 to wordpress 2.2. You may be wondering why I would consider this a guilty pleasure. Well, wordpress really is a pleasure to use, but it just happens to be written in PHP. Of course, I really have no desire to start customizing my blog software beyond a few tweaks to the theme, so I really shouldn’t be bothered by this. However, I do see the overabundance of PHP blog/forums/CMS software as a gateway drug to full blown PHP programming. Being a programmer by trade, I realize that I will not always be able to choose the programming language of the projects I work on, and the more PHP developers that exist, the more likely that my job will depend on working with it.
That’s enough negativity, since wordpress is really amazing. I chose wordpress, after reading many reviews of various blog software. Here are the two most significant.
The main deciding factors that caused me to go with self-hosted wordpress versus free blog hosting at blogger or wordpress.com is that I want my own domain name, and I am fascinated with making money from web advertising which blogger & wordpress.com don’t let you do.
When I first installed blojsom, I was interested in getting more experience with java wars (web archives, not Starbucks vs. independent coffee houses), so I am not really disappointed in having to make the switch. I was disappointed with the poor user interface for administering blojsom. To edit a blog post, I would first have to remember or look up the category it belonged to before I would get a drop down list of the posts that I could edit or delete.
The most difficult part about setting up wordpress is creating a mysql database and making sure the file permissions were correct. If you are setting up wordpress for someone else, almost everything can be configured through the admin console except for uploading new themes or plugins. If you upload a new theme, be sure to choose one that is widget-ready.
Here is a short list of cool features in Wordpress:
- While you are writing a post, it is periodically saved so that you don’t lose it if your browser crashes.
- A drag-and-drop interface for adding widgets to your sidebar under Presentation/Widgets in the admin console.
- Gregarious is a very cool social bookmarking plugin.
- You can edit the post in WYSIWYG or HTML mode.
- You easily import your old blog using the Manage/Import page. I used the RSS importer to pull in my blojsom posts. It worked great except for a few line wrapping issues caused by wordpress treating a newline as a <br/>.
Since my old blog was indexed by google, and I didn’t want to break anyone’s bookmarks, I tried to map as many of the old urls to the wordpress blog, using these steps.
- Under Options/Permalinks, I entered this custom permalink structure:
/%postname%.html
Blojsom formats urls as permalinks or as category plus date urls, but both included the title of the article, so I could use mod_rewrite to remove all the extraneous info in the urls. Blojsom also put “.html” at the end of its article urls, which I decided to keep, since I thought a mod_rewrite rule to remove “.html” could affect urls that I never intended to rewrite.
- Here are the rewrite rules that I added to my apache configuration. I did not put these in the .htaccess file, since wordpress wants to put its own rewrite rules in .htaccess, and I wanted my rules to take precedence.
RewriteEngine on # Remove category & date from blojsom style url RewriteRule /[^/]*/200[67]/[0-9]*/[0-9]*/(.*) /$1? [R=permanent] # Convert "/?permalink=foo&extra=bar" to "/foo" RewriteCond %{QUERY_STRING} permalink=([^&]*) RewriteRule /.* /%1? [R=permanent] # Convert "/?flavor=rss2" to "/feed/" for RSS version 2 RewriteCond %{QUERY_STRING} flavor=rss2 RewriteRule /.* /feed/? [R=permanent] # Convert "/?flavor=foo" to "/feed/foo" for RSS version 0.92, ATOM, and RDF. RewriteCond %{QUERY_STRING} flavor=([^&]*) RewriteRule /.* /feed/%1? [R=permanent]

Atom Feed