Tuesday, November 29, 2005

IE Tab FireFox Extension is great!

The IE Tab FireFox Extension is awesome! It allows you to open the current page in a new tab, rendered by the Internet Explorer engine.

Although most sites work fine in FireFox, it's an unfortunate fact of life that some sites are designed to work with Internet Explorer only. To deal with this, I've been using the IE View FireFox Extension, which allows you to open the current page in an Internet Explorer window.

It allows you to define a list of sites that will always open in IE, which is useful if you use FireFox as your primary browser, but frequently need to use some IE-only sites.

This new IE Tab extension allows you to configure the same kind of list.. sites that will always open in an IE Tab. It even supports Ctrl-leftclick to open the current IE Tab into a new Internet Explorer window, using the IE View extension! I highly recommend both of these extensions.

Wednesday, November 23, 2005

Simple column name list in sybase with sqsh

At my current job, we primarily use Sybase ASE for our database servers. For most of my querying needs, I use a nice little tool called sqsh, a handy replacement for the basic Sybase 'isql'.

I hate the excessive amounts of output that sybase gives me when I do 'sp_help [table_name]', because most of the time all I'm trying to do is get a list of column names for a particular table.

MySql's 'show databases', 'show tables', 'show columns', etc. seem so much more intuitive to me.

So, a couple days ago I chained together a few tools, and created an alias + function combo that let me simply type 'show_columns [table_name]', and get nothing but a quick list of column names.

Here is what I added to my .sqshrc file to make this a permanent addition to my collection of useful commands

\func show_columns_func
\echo Column list for table: ${1}
sp_help ${1}; -m vert grep "Column_name:" \sed -e 's/Column_name: *\([^ ]\)/\1/g'
\done
\alias show_columns="\call show_columns_func "