Archive for the ‘Uncategorized’ Category

Damages

February 25, 2010

Damages is a fantastic series. The wee heroine is a bit incredible, but Glenn Close is great and Ted Danson is absolutely amazing.

I’ve only watched S1 so far, but plan to watch S2 soon … probably hopefully on the plane on my next trip to the states. God bless ipod touches.

vim: re-read your .vimrc

February 25, 2010

To re-read your vimrc, type:

:source $MYVIMRC

vim: dealing with split screens

February 25, 2010

Some useful commands for dealing with split screens in vim:

  • :split  – split the screen  (:vsplit splits vertically)
  • ^Ww – go to the other window
  • ^Whjkl – go to the window in the specified direction
  • ^W+ – increase the height of the window (- decreases it), add a count if you like
  • 42^W_ – set the height to 42 lines
  • ^W> – increase the width of the window (< decreases it), add a count if you like
  • :close – close the current window
  • :only – close all other windows

vim: scroll screen up and down without leaving current line

February 25, 2010

To move the *screen* up or down without actually leaving the line you’re on, the commands are ^E and ^Y.

vim: reset the search pattern

February 25, 2010

To reset the most recent search pattern (used by ‘n’ and ‘N’, among others), do:

:let @/= “”

Setting it to an empty string actually sets it to nothing. Put a different pattern in the quotes if you prefer.

(I’ve found this useful when setting up complex search/replace macros.)

vim: count occurences :%s/wibble//gn

February 25, 2010

To count the number of occurences of a pattern in vim, use:

:%s/wibble//gn

vim: zz to center screen on current line

February 25, 2010

The vim command “zz” moves your screen up or down so that the line you’re on ends up in the center/centre of the screen.

Great list of ubuntu apps

November 3, 2009

This is a great list of apps on/for ubuntu…

http://blog.thesilentnumber.me/2009/09/top-things-to-do-after-installing.html

Firefox blank start page

August 26, 2009

Nowadays I mostly use chrome, but when I use firefox (and IE), I like it to start on a blank page.

To do this, you put “about:blank” into your home page.

Recent firefoxes have a separate option for “blank page”, but “about:blank” works in pretty much all browsers that I’ve met.

cygwin nslookup/dig problem

August 26, 2009

Cygwin’s nslookup and dig didn’t work for me. Annoying problem:

;; communications error: connection reset
$ nslookup www.dullsoft.com
;; communications error: connection reset

It turns out the answer is to make an /etc/resolv.conf file. Unfortunately it looks like you have to keep it up to date manually as you change networks – it can’t figure out windows’ nameservers by itself. But such is life. An empty /etc/resolv.conf file doesn’t help.

But at least nslookup now actually works on cygwin.