ack (on Ubuntu named ack-grep, so if you’re using Ubuntu then replace ack in the example commands in this article with ack-grep) is a friendlier alternative to grep for most uses. One of the features I really like is that ack distinguishes files by type and that you can tell ack to explicitly look at certain file types, or to exclude certain file types from your searches.
So you’re developing networked applications on your own computer and now you want to test using different host names or URLs that route to localhost (because obviously that’s where your running everything). Surely you could go on and edit your hosts file every time you need a new host name, but that becomes tedious and annoying quickly. This article will describe how to use Dnsmasq on Ubuntu 11.04 to setup a (top level) domain for which all host names will route to localhost (your mileage will vary on other distros).
If you work on *nix systems (UNIX, Linux, Mac OS X, BSD, etc.) and you want to extract information from text files such as log files of different kinds and/or lengthy output from other command line tools you’ll want to learn about sed. Sed stands for stream editor, it is an incredibly powerful non-interactive text editor/processor/filter that takes input via a *nix pipe and transforms it based on command line parameters and then outputs the result.
Ubuntu 11.04 has been released recently, so I decided to give it a spin on my own machine. Unfortunately getting it to work was not without problems, this article describes what I’ve run into so far and how I fixed it.
I am currently employed by a company that runs it’s development environments on a Solaris 10 server, and I often work on that machine’s shell over SSH. Often I want to use an editor directly on that machine (because that’s convenient), and my preferred editor is Vim. In my case the server had Vim 6 installed and I wanted to use Vim 7.3 (the latest version at the time of this writing), because some of my favorite Vim extensions require Vim 7.
Assuming that you have access to gcc and gmake it’s easy to install Vim in your home directory. For this article I’ll provide examples using bash, if you’re using another shell your command syntax and the preference files you need to edit will likely be a little different.
On August the 29th Ruby on Rails 3 was been released, the Rails team has made a series of screencasts available about the changes in Rails 3 here. Ryan Bates also made a series of screencasts about Rails 3 on Railscasts.com here. Let me start this article by thanking everyone for their hard work on Ruby on Rails 3, it’s a fantastic release!
If you use Vim on multiple platforms like I do, you may find it convenient to know that you can detect the platform your installation Vim was compiled for in Vimscript. With this functionality you can put all your settings for all your systems in a single vimrc file.
One of the features I find very convenient in Vim editing in visual blocks.
With CTRL+V (while in normal mode) you can activate the visual block mode, by using the standard movement keys (h, j, k, l or the arrow keys). You can perform various operations on visual blocks (check the help with :help v), in this article I will describe how you can prepend or append text to a block.
It’s fairly simple to create a USB flash drive that can be used to boot a computer and install Windows Vista (assuming that the computer that you want to install on can boot from a USB flash drive). To get your USB flash drive ready you need the following:
- USB flash drive of the appropriate size (I used a 6GB drive)
- Windows Vista install DVD
- Computer that has Windows Vista installed, a DVD drive and has a free USB slot (for use with the USB flash drive)