February 16, 2010

grep --color

I use grep a lot. Today I realized that others might not know that GNU grep can highlight matches, or how to combine it with less. So here's part of my Bash config, and some examples uses:


alias grep='grep --color=auto'
alias egrep='egrep --color=auto'

function legrep {
  egrep --color=yes "$@" | less -R
}

$ legrep '[Gg]nome' */*.xml
$ legrep -i foo /usr/share/dict/words
$ grep bar | egrep -v 'baz|qux' | legrep bar

July 30, 2009

Amazing Lenovo Support Experience

My Lenovo Thinkpad T61p died today, but I'm still in a good mood. I've never had such a positive experience calling any company's support line before.

Finding the phone number for Lenovo was a bit of a hassle, but everything else was painless. I spent less than two minutes in the call queue before talking to a human being. Lenovo was careful to mention several times that they were transferring me to their Georgia call center. The cynical might suspect they meant the eastern European nation, but I'm inclined to believe it really was the state. The person I spoke with had an American accent and understood everything I said. He wasn't blindly following a script, but actually listened to what I said and responded appropriately. Within a minute he had decided to replace the entire mainboard. No hassle!

I've recommended Lenovo before because of the quality of the Thinkpad. Now I can add the amazing support. IBM's hand off to Lenovo scared me a little, but they seem to be doing an excellent job. Let's hope it stays that way.

March 10, 2009

Fast Times at Guru Labs

Q: So what did you do today at work?

A: Oh, you know, the usual. Threw stuffed penguins at one boss. Put forty pounds of putty on my other boss's head then watched it slowly melt around him. Buried a co-worker in roughly one thousand stuffed penguins... And you?

It's going to take some time to process all the photos, but I promise we'll share. Stay tuned.

February 21, 2009

tellme: A Simple Shell Script Helper for XOSD

Derek Carter, a friend and former co-worker, was recently trying to use XOSD to display text on the screen while recording screencasts. As a result, I ended up creating a simple shell function to make osd_cat easier to use.

function tellme() {
  echo "$*" \
    | fmt -20 - \
    | osd_cat -c red -p middle -A center \
              -f "-*-*-bold-i-*-*-128-*-*-*-*-*-*-*"
}

I've already found this it quite helpful during my daily work flow. For example, I've used it to tell me when a large file is done moving or a compile is completed. The following screenshot shows an example.

tellme.png

April 26, 2008

Firefox 3: Two Steps Back

I upgraded to Ubuntu 8.04 (Hardy) this weekend. So far my first experience with Firefox 3 hasn't been great.

First the minor issue: When I launched FF3, my fonts were messed up. Some pages looked normal, others had ugly huge fonts. Maybe the big fonts are a problem with Ubuntu's Freetype config. Maybe it's a problem with the nVidia drivers. I don't know. Thankfully, I found a workaround. In Firefox about:config set layout.css.dpi to 96. (http://ubuntuforums.org/showthread.php?t=706788&page=2)

Now my bigger gripe: I don't like the new rich urlbar. Back in FF2, I could open most of my favorite sites in 4 keystrokes or less. By increasing the amount of data the new urlbar searches, the Firefox devs have decreased the unique identifiers for each link. So far, I haven't found a fix. It isn't just the slow loading or the giant waste of space, the most important detail is the sorting algorithm. I know abou the oldbar plugin, unfortunately it's only a cosmetic fix because it doesn't include the old FF2 sorting.

Hopefully I'll find reasons to like FF3, but for now it feels like Firefox has taken two steps back.