This site is best viewed in Firefox.

The joy of colors

Sunday, 09 November 2008

Ever so often, as I have mentioned before, I lose myself in trying to find new ways of working and doing my daily tasks, one such digression is the topic of editors. I mainly use GNU Emacs for development and other major tasks, for everything else I use vim.

Vim is quick to start, capable, good looking and easy to use, contrary to other vi implementations. (Most notably nvi, which I hate with a passion!) Today I found a neat colorscheme that works well on terminals with a black background. It's called 'advantage' and is available from the Vim Color Scheme Test.

To install it you simply download advantage.vim and copy it to your /usr/share/vim/vim71/colors/ directory. Then you open your current C source in vim and type :colorscheme advantage.

Thank you Shan Leung Maverick Woo! :-)

Posted by Joachim Nilsson at 00:39 in /unix | Permalink

Regexp replace in many files

Sunday, 13 July 2008

I just have to blog about this exceptional tool I just found. It is called regexxer and is a tool in the true UNIX spirit — it does one job only, and does it well.

Posted by Joachim Nilsson at 21:38 in /unix | Permalink

Top Ten UNIX Shell Commands

Saturday, 23 September 2006

Current trend is to run the following one-liner from IBM. I'm usually logged in to the following three systems, with very different results:

vmlinux.org

$ history |awk '{print $2}'|sort|uniq -c|sort -nr|head -10
    144 ls
     61 cd
     58 sudo
     29 less
     23 emacs
     19 bzr
     16 vim
     11 rm
     10 wget
     10 mv

My personal life. Not much different from my professional dito. Most visible difference maybe is my use of bzr instead of svn. At the time we decided on svn at work bzr had not matured enough and darcs didn't (still doesn't) have a Windows client as good as TortoiseSVN.

Build server @work

$ history |awk '{print $2}'|sort|uniq -c|sort -nr|head -10
    108 cd
     63 svn
     44 search
     41 ls
     25 sudo
     23 less
     23 ./build.sh
     21 make
     17 ./netprobe
     16 man

Mostly work stuff, 'search' is a small wrapper around find that skips .svn dirs and semantic.cache files and other annoying things you constantly run in to when looking for something. The build script is a small wrapper around make for our Snapgear and uClinux-dist trees. Netprobe was one of the last prototypes I wrote to investigate some UNIX peculiarities involving libnet and libpcap.

troglobit (my laptop)

$ history |awk '{print $2}'|sort|uniq -c|sort -nr|head -10
    140 sudo
     47 ifconfig
     45 less
     27 ps
     26 ssh
     25 iwconfig
     21 ping
     21 man
     15 ls
     15 cd

Well, I'm having trouble with my laptop network. The wlan (wpa_supplicant) doesn't like suspend/resume on my ThinkPad T43.

Update: I had to make an update to this, even at first I had my doubts about the first script. It didn't feel right, now after revising it, and reading Planet Debian, I noticed Erich Schuberts entry. There it was, the working script, which I only had to bashify! Thanks Erich!

Posted by Joachim Nilsson at 23:02 in /unix | Permalink