Entries from April 2008

Enable Mouse Wheel Scrolling in Ubuntu Hardy 8.04 Under VMWare

Date April 29, 2008 by Isaac

I recently installed Ubuntu Hardy (8.04) into a VMWare image on my WIndows machine.  I know, that’s backwards, Linux should be the host not the guest.  It’s actually my wife’s computer, so I dare not remove Windows.
Anyway, the mouse wheel was not scrolling properly.  After some searching I found the answer here.  Basically, you need [...]

Cloning a List in Python

Date April 14, 2008 by Isaac

As far as I know there is no official way to clone a list in Python. This is desirable at times because normal variable assignment of lists is just a reference copy. For example:
 
>>> listA = [’A', ‘B’, ‘C’, ‘D’]
>>> listB = listA
>>> listA
[’A', ‘B’, ‘C’, ‘D’]
>>> listB
[’A', ‘B’, ‘C’, ‘D’]
>>> listA.remove(’C')
>>> listA
[’A', [...]

Adding Emacs to Windows Right Click Menu

Date April 13, 2008 by Isaac

First of all, if you don’t have Emacs installed on Windows then you should download it now.
Once you have Emacs installed then you’ll naturally want to add “Open With Emacs” to your Windows right-click menu. To do this you’ll need to make a registry entry. The easiest way is to copy [...]

Turning a Multi-Line File Into a CSV File

Date April 10, 2008 by Isaac

Linux has many amazing programs that can be chained together to produce amazing results. Today I needed to turn a multi-line file into a CSV (comma separated) file. In Linux this is super easy:
cat file | tr ‘\n’ ‘,’
Basically, this will turn a file like this:
Line1
Line2
Line3
Line4
Into this:
Line1,Line2,Line3,Line4