In this article, I am going to discuss ways I gave my five-year-old laptop a new life. In 2007, I purchased a used laptop to learn .NET programming. Since it was an old laptop, the machine barely had enough horse power to run Windows Vista. Soon, my job no longer require .NET programming, I promptly […]
August 1, 2011
I was bored. My old laptop has been running Linux Mint for a while and now I want something different so I checked out BSD, PC-BSD to be more specific. In the past, I have been flirting with BSD several times, and ended up abandon BSD for Linux. This time is no exception. Before going […]
July 2, 2011
The Problem In Linux Mint, the default font and background color for tkcon is terrible. I want to change that to something easier to read. The Solution Here is my ~/.tkconrc, which fixes it by choosing a better font and background color: Discussion The default font in Linux Mint is terrible: it is hard to […]
April 26, 2011
The Problem After the cd command, the next command is almost always ls so we want to combine the two to automatically issuing the ls command right after the cd command. The Solution In bash, add the following line in either ~/.bash_profile or ~/.bashrc: If you are using csh or tcsh, add the following line […]
March 10, 2011
The Problem I want to squeeze multiple blank lines into just one while editing in vim. I often receive source code which the author used multiple blank lines to separate functions. I don’t mind if functions or code block are one or two lines apart, but I have seen sources where functions are four or […]
April 14, 2010
The Problem I want to configure WGet to go through a proxy server without having to specify that on the command line The Solutions The first solution is easy: I can set a shell variable called http_proxy. Here is an example in bash: Another solution is to place this information in a configuration file called […]
September 10, 2009
The Problem Sometimes, I need a simple menu in bash, but I don’t want to spend a good deal of time coding for one. The Solution Bash has a built-in command called select which gets the job done. To demonstrate this command, I am going to write a short bash script. This script lists all […]
September 3, 2009
This is a follow-up to my previous post. The Problem The ls command in Redhat Enterprise Linux (RHEL) by default uses the dark blue to show directories. This color is hard to see, especially on laptops with dim screens. I would like an easy way to change that. The Solution The solution is similar to […]
May 8, 2009
Since I work on Linux/OSX command line all day, I prefer to get my information such as stock quote or weather via command line. Here is a script to do that. A couple of notes: I use curl instead of the TclCurl package because my system does not come with TclCurl The script employs Google […]
May 6, 2009
I live on command line all day, so it is convenience to perform many tasks using the command line. One of those is to check stock price: curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=csco&f=l1' The above command check for the last price (with some delay) of Cisco Systems. If you want to check the price for other tickers, replace […]
May 24, 2012
0