Archive

Neato Tools

I have not posted in more than a month. It has been quite a trying month. I have been married, supervised the birth of my 3 children, build a homeless shelter, and peeled an entire bag of potatoes. Oh ho! Quite a month!

You got me; I didn't do any of those things. If I had, what an excuse for not posting, huh? I mean, that would be a seriously hectic month. One would be hard-pressed to even tweet in the midst of all of the hectic halabaloo.

Despite all of the lack of not doing things, I haven't taken the time to even write anything substantial. What I do have are a couple of links or blurbs about new(ish) tools that I find neato and/or useful. I hope you are in agreement. If you have any other suggestions of neato and/or useful things of which you think I should know, than please comment immediately!

Wirble

The Ruby Gem Wirble is so awesome yet so easy to overlook. If you haven't used it, you have no idea what you are missing. If you have used it, you probably are unable to work without it. Wirble is a set of enhancements for Irb. If you ask me, colorized results and tab completion are enough to make the gem indispensable, but there are a few other features as well. Here's an example:

Wirble!

codepad

The site codepad.org is a web application along the lines of Pastie. It is a simple paste site. At codepad, however, you can also see your code executed (assuming you are pasting one of the supported languages -- yes, Ruby is included). I stole an example from Why's Poignant Guide to demostrate: http://codepad.org/3jtYZfRD.

shell-fu and dotfiles

You may have already heard of dotfiles.org. It is a site which can be used to upload, download, and share your various configuration files. In particular, things like .bashrc, .vimrc, .screenrc, et cetera. It is certainly worth checking out. Also cool is that world famous Rubyists such as topfunky and _why.

I don't think that shell-fu is all that new, either, but it's a good site. It lists user-submitted command-line tips, tricks, and other assorted treats. It's like bash.org, except most of the items actually have something to do with bash, the shell. (You know, as opposed to creepy social commentary by pale basement-dwellers.) Actually, if you have some tips, please add them. That site is in need of some fresh oil, even if it's not the fancy, expensive, synthetic stuff that they put in Ferraris.

GitHub

Git. You have all heard about it. Even you short, hard-of-hearing folks in the back. You could not have missed it. People have been yelling it into megaphones while standing atop stages (I'm not even positive that's not true). If you waste too much time reading what other Rubysists and Rails-ists write online (like me), you have also heard about GitHub. GitHub is a Git repository host, with a bit of a social bend, not to mention the pretty display, the RSS feeds, and more.

I just happen to have a GitHub account. If you'd like to see some of my 'dotfiles', you can see them in the mileszs-linux-configs repository. (You should be aware, some of them were mostly written by my friend Aaron.) Use all or part of them, as you wish.

GitHub is currently in their beta-testing, invite-only phase. If you need an invite, I have two (only two!) invites left. The first couple interested emails I recieve can have them.

Conclude Already

Neato, huh? Enjoy! Also, tell me what you think I missed, as I'm sure I missed some cool tools.

Browser Wars II

Are we headed for another browser war? Firefox is slowly, but surely, gaining market share. Safari seems to be doing the same. IE continues to dominate, spread across several versions, of course. Opera exists. I think we're at least headed for an arms race.

Firefox is Awesome

I think I may be a Firefox fan-boy, so take what I say with a grain of salt. Firefox is awesome. Yes, this includes its current, sluggish, version number 2. Why? How? It is awesome, if not for its open sourced-ness and Mozilla's commitment to standards, then for the Firebug and Greasemonkey extensions. Those two tools are absolutely indispensable for me. I could make it through a day without them, but I wouldn't want to try.

I really like the customization possibilities more than anything. I can make Firefox do exactly what I need it to do. That is the single biggest reason I love Firefox.

Are those good reasons for the average user? No. Making the Firefox-over-IE argument for average users could probably be a post unto itself -- one I'm not writing any time soon. (I would be willing to discuss it. Email me, or something.

I Prefer My Musicals in English, Thanks

Then there is Opera. I am often confused as to why I don't really like it. There are some aspects of the UI that bother me. Big deal, right? They are probably even fixable, but I could not figure out how within the first 15 minutes. However, the Opera guys continue to add interesting features, and they continue to chase standards compliance. In fact, they were the first to get 100/100 on Acid3. Well, I am still not a big fan. We will blame it on Opera's proprietary nature, I guess. I am very happy that they continue to provide competition, though. That is good for everyone.

Safari Is Probably Cool

I downloaded the Windows version of Safari. (Note: They make me use Windows at work. Other than that, both my job and the company for which I work are pretty awesome.) I opened it and browsed to Hacker News. Then, I closed it. Listen, I'm sure it's awesome. It did seem fairly fast, which is their big claim. Maybe I didn't really give it a chance.

Have I mentioned Firebug and Greasemonkey, though? Not to mention Tiny Menu, or YubNub. YubNub! I use it every day, and it is so perfect I don't even think about how awesome it is.

I'm sorry, Safari. I'm sure I'm not giving you a fair shake. I mean, WebKit is getting 100/100 on the Acid3 test now, and that's a big, important deal, right? Well, Rob Sayre at Mozilla doesn't think so. Don't dismiss what Rob is saying simply because he sounds like he's pouting and kicking at the ground. I think he's right. I hope that everyone, including Mozilla, continue working to get their browsers to pass Acid3 (and Acid4, and Acid5...), but I think it is obvious that the hype is quickly approaching a ludicrous apex. As a friend of mine observed, they are now 'teaching to the test' -- referring to the tendency of school teachers to teach just what is needed for their kids to do well on standardized tests, rather than teaching the whole of what might be useful or interesting. Many of these browser teams are fixing and implementing just enough to pass these tests. I think that WebKit's Changeset 31322 tends to support that point. Teaching to the test can produce good, media-friendly results, but are you really serving your users?

IE8. It's coming! It's coming! It's coming!

Internet Explorer 8 passes Acid2. You can download the IE8 Beta. It even has a debugger that may or may not be useful (see the comments). I still don't like it. Yeah, they are moving in the right direction. Yeah, I'm excited that Microsoft zealots and the lazy may some day soon be using a browser that doesn't blow, but I don't want to use it. I still don't like the UI. I still don't like its proprietariness. I still don't like the debugger. Yeah, I still don't like Microsoft. I said it. I don't. Little things like this screen shot bother me:

Screenshot of IE8 Download page

Why make me click to expand the requirements? Because it looks cool. Why tell me about the CD-ROM drive that I don't need? It's stupid. Yeah, I'm nitpicking, but these sort of things bug me, and piled on top of all of the other things involving IE over the years, you've got yourselves a huge landfill, in front of which they are building a shiny new office building. Please ignore the trash, just pay attention to the marble staircases in this building!

Firefox 3 on the run

I will continue waiting for Firefox 3 with baited breath. Actually, I will download the thing as soon as Firebug and Greasemonkey support it. We're at beta 4, and moving quickly. By moving quickly, I mean it is faster than everything! I can hardly wait.

Do I Need a Flak Jacket and Bayonet?

There could be a war on the horizon. We know that IE8 will eventually be a forced, automatic update. It looks like Apple is already pushing Windows users to download Safari, in a guerrilla-like fashion. Firefox continues to gain ground, but they haven't gotten nasty yet. Will they? What about Opera? Will they increase their relevance? (Sorry guys!) What do you guys think?

Tweeting from the Command Line

A recent tweet from Tim Bray contained a link to an article explaining how to tweet from the command line. That prompted me to write a quick script to make tweeting from the command line a bit easier. You can can download the script: tweet. You can grab it from GitHub:

git clone git://github.com/MilesZS/command-line-tweet.git

You can see the script below:

#!/bin/bash

# Author: Miles Z. Sterrett <miles -dot- sterrett AT gmail -dot- com>
# Created: 03-29-08
# Updated: 03-29-08

# Sends an update to Twitter

# Uncomment and enter your own Twitter info
# to avoid having to use the command line parameters
#USER=username
#PASS=password

function force_response {
  message=$1
  local answer=

  read -e -p "$message" answer

  while [ -z $answer ]; do
    echo "You must enter a value to continue..."
    read -e -p "$message" answer
  done

  eval $2=$answer
}

while getopts "u:p:hm:" OPTION
do
  case $OPTION in
    u) 
      USER=$OPTARG
      ;;   
    p) 
      PASS=$OPTARG
      ;;   
    h) 
      usage   
      exit 1   
      ;;   
    m) 
      MESSAGE=$OPTARG
      ;;   
    ?) 
      usage   
      exit   
      ;;   
  esac
done

shift $(($OPTIND -1))

MESSAGE=$1

function usage {
  cat <<EOF
  Usage: $0 [-h] [-d DOMAIN] [-e EMAIL] [-u USER]

  This script will post a message to Twitter

  -h            This usage information.
  -m            Your message
  -p PASS   Twitter password
  -u USER       Twitter user name
 
EOF

}

if [ -z $USER ]; then
  force_response "Enter your Twitter user name: " username
  USER=$username
fi

if [ -z $PASS ]; then
  force_response "Enter your Twitter password: " password
  PASS=$password
fi

if [ -z "$MESSAGE" ]; then
  force_response "Enter your update message: " message
  MESSAGE=$message
fi

curl -u ${USER-`whoami`}:$PASS -d status="$MESSAGE" http://twitter.com/statuses/update.xml

exit 0

I prefer to copy the script to /usr/local/bin, put my Twitter information in the script itself, and then:

tweet 'So, today, I totally wrote a bash script and stuff'

If you don't like that, you can do something like this:

./tweet -u username -p password 'DHH and Linus are actually long lost twins.  Discuss.'

If you simply execute the script, it should prompt you for the various required information.

I don't claim to be the most skilled bash scripter on the Internets. I encourage you to let me know what you think about it, fork it and improve it, or steal it and tailor it to your use.

Also, I am well aware that I spent more time on this than simplifying that curl call was really worth. I loved every freakin' minute of it, too.

Note: Some functions in this script, as well as much of the style, is courtesy of browsing scripts written by my friend Aaron Schaefer. So, thanks, Aaron!

Powered by Drupal - Original Theme by Artinet - Theme Enhancements by Me