man rtfm

Waterloo actually has a manual entry for RTFM!

djshaw@cpu22:~$ man rtfm

RTFM(I)                   UW Information                   RTFM(I)

Name:
     rtfm - Read The Famous Manual

Description:
     You might see the expression “RTFM” in response to a ques-
     tion or a gripe.

     This means that whatever you asked or complained about is
     already documented in the man page. It usually is intended
     to indicate that you should have read the appropriate manual
     before bothering, and wasting the time of, the person using
     the expression.

See Also:
     man(1), gripe(1), consultant(I), operations(I)

Bugs:
     The “F” doesn’t really stand for “Famous”.

Copyright:
     (c) 1986, MFCF, University of Waterloo.

Formatted 87/05/05              UW                              1

Unfortunately, Waterloo does not have a manual entry for woman.

Opcodes (misc)

Comments (0)

Permalink

How Much Time Have You Spent Listening To Music?

I am procrastinating; I do not want to write my work term report. I started to wonder how long iTunes has been playing music for.  I wanted to use python to do the calculation. Unfortunately, the Cygwin version of python does not come with the win32 extension binaries, so I had to use Java. Luckily, someone has created a jar to do all the heavy lifting for me.


import com.dt.iTunesController.*;
import java.math.BigInteger;

class Main
{
    public static void main (String[] args)
    {
        iTunes itc = new iTunes();
        ITTrack itt = itc.getCurrentTrack();

        ITPlaylist playlist = itc.getLibraryPlaylist ();
        ITTrackCollection tracks = playlist.getTracks ();

        int sum = 0;

        for (int i = 1; i <= tracks.getCount (); i += 1)
        {
            ITTrack track = tracks.getItem (i);

            sum += track.getPlayedCount () * track.getDuration ();
        }

        int seconds = sum % 60;
        sum /= 60;

        int minutes = sum % 60;
        sum /= 60;

        int hours = sum;

        System.out.println (hours + ":" + minutes + ":" + seconds);
    }
}

I have listed to 868 hours, 18 minutes, and 40 seconds of music.

Java
Programming

Comments (1)

Permalink

R Brothers

Other Derek ShawI got an interesting email yesterday. Someone from “R Brothers Concrete, Inc” thought that I was this “Derek Shaw” character. While it is true that I am indeed a “Derek Shaw”, I am not the Derek Shaw they were looking for. At first, I thought that the email was spam, but the inclusion of a telephone and fax number made be curious. 2150 Elkins Way is a real location, so I decided to call and see if they were legit. I called late last night, after 6:00pm California time; a machine picked up, and identified itself as R Brothers Concrete.

I called R Brothers earlier today. A secretary connected me with accounting. As soon as I identified myself as Derek Shaw, the man on the other end recognized the name and started to describe the state of the project. Interrupting him I told him that I was Derek Shaw, but not the one he thought I was. I could hear the confusion. It took a few minutes, but I eventually convinced him that there were more than one Derek Shaws in North America. Personally, I was supprised that this is not spam.

Opcodes (misc)

Comments (0)

Permalink

Prevent the school’s imacs from auto logout

After about 90 minutes of inactivity, Waterloo’s imacs will automatically log out the inactive user. I have my own office in Waterloo, complete with imac. The auto log out behavior is rather annoying, I like to log in once and then not think about it again. A visible messagebox will prevent the auto logoff process. To prevent the auto logoff, open Firefox and enter javascript:alert(''); into the address bar (and hit enter). This should open a message box, preventing logoff; do not close this message box until you plan on resuming work.

SE 2010

Comments (0)

Permalink

Gnu tools on Waterloo’s student.cs environment

I like my gnu coreutils. Unfortunately, Waterloo is running Solaris 5 with some old coreutils binaries. Fortunately, someone in IST has put some of the coreutils on student.cs. You can use showpath to get the gnu coreutils in your path.

To get gnu’s core utils in your path, add the following to your .bashrc file:


if [ `uname -s` = "Linux" ]; then
        PATH=$PATH:~/bin

        alias ll='ls -l --color=auto'
        alias dir='ls -ba --color=auto'
        alias lla='ls -la --color=auto'
        alias ls='ls --color=auto'
elif [ `uname -s` = "SunOS" ]; then
        PATH=`/bin/showpath gnu current standard man $HOME/bin`

        alias ll='ls -l --color=auto'
        alias dir='ls -ba --color=auto'
        alias lla='ls -la --color=auto'
        alias ls='ls --color=auto'
elif [ `uname -s` = "Darwin" ]; then
        alias ll='ls -lG'
        alias dir='ls -baG'
        alias lla='ls -laG'
        alias ls='ls -G'
else
        PATH=`/bin/showpath current standard man $HOME/bin`
        alias ll='ls -l'
        alias dir='ls -ba'
        alias lla='ls -la'
fi

SE 2010

Comments (0)

Permalink