Archive for March, 2011

Help Solve an Open Murder Case – (Seriously?)

March 31, 2011 Leave a comment

Part 2: Help Solve an Open Murder Case


On June 30, 1999, sheriff’s officers in St. Louis, Missouri discovered the body of 41-year-old Ricky McCormick. He had been murdered and dumped in a field. The only clues regarding the homicide were two encrypted notes found in the victim’s pants pockets.

Despite extensive work by our Cryptanalysis and Racketeering Records Unit (CRRU), as well as help from the American Cryptogram Association, the meanings of those two coded notes remain a mystery to this day, and Ricky McCormick’s murderer has yet to face justice.

“We are really good at what we do,” said CRRU chief Dan Olson, “but we could use some help with this one.”

In fact, Ricky McCormick’s encrypted notes are one of CRRU’s top unsolved cases. “Breaking the code,” said Olson, “could reveal the victim’s whereabouts before his death and could lead to the solution of a homicide. Not every cipher we get arrives at our door under those circumstances.”

Categories: news Tags: ,

Emacs Meta key

March 31, 2011 Leave a comment

Typing M-x using one hand was just not working for me. Both Alt keys on the keyboard are meant to behave as a Meta key but mine did not. Turns out that all I had to change was my Keyboard settings. Here is what I did on Ubuntu (Generic Keyboard Layout).

Keyboard Layout options.

  1. Alt/Win Key behaviour
    • Alt and Meta are on the Alt Key
  2. Third Level choosers
    • Press Right Ctrl to choose 3rd level (Previously set to Press Right Alt to choose 3rd level)
    • Press Right Win-Key to choose 3rd level

That worked. Now both Alt Keys behave like Meta.

Categories: emacs Tags:

Learning Emacs – Ch 2 (Editing)

March 30, 2011 Leave a comment

Chapter 2 – Editing

A. Movement
1. Characters
    C-p (previous-line)
    C-n (next-line)
    C-f (forward-character)
    C-b (backward-character)
2. Words
    M-f [forward a word]
    M-b [backward a word]
3. Lines
    C-e [end of the line]
    C-a [beginning of the line]
4. Sentences
    M-a [move backward one sentence]
    M-e [move forward one sentence]
5. Screen
    C-v or PgDown Key [page down]
    M-v or PgUp Key [page up]
6. Buffer
    M-> or End Key [end of a buffer]
    M-< or Home Key [beginning of a buffer]
7. To a specific line
    M-x goto-line Enter n Enter
    M-x goto-char Enter n Enter

B. Repeating Commands
M-n (digit-argument) eg M-500 C-n [move the cursor down 500 times]

C. Deleting Text
C-d (delete-character)
M-d (kill-word)
C-k (kill-line)
M-k (kill-sentence)
C-y (yank) [restore what you deleted]

D. Undo
C-_ or C-x u

source: “Learning GNU Emacs, 3rd Edition by Debra Cameron, James Elliott, Marc Loy. Copyright © 2005 O’Reilly Media, Inc. ISBN 0-596-00648-9”

Categories: emacs Tags:

Learning Emacs – Ch 1 (Basics)

March 29, 2011 Leave a comment

Objective: Learn Emacs by reading this book. “Learning GNU Emacs, 3rd Edition By Debra Cameron, James Elliott, Marc Loy”

Chapter 1 – Emacs Basics

Open a file C-x C-f (find-file)
Save a file C-x C-s (save-buffer)
                  C-x C-w [Equivalent of save as]

Quit C-x C-c

Help C-h
        C-h ? [list of options]
        C-h t [tutorial]
        C-h k (describe-key) C-h C-x i [ie describe the key for inserting a file. 
                                                        C-x i (insert-file) ]
        C-h f (describe-function) C-h f find-file
Categories: emacs Tags:

Deb Roy “The birth of a word.”

March 29, 2011 Leave a comment
Categories: Interesting Tags:

screen – copy command

March 29, 2011 Leave a comment

When using screen. To scroll up and view “display history” 🙂

C-a esc (copy) Enter copy/scrollback mode.

To leave scrollback mode press ESC

Categories: bash Tags:

using join to merge files

March 28, 2011 1 comment

$cat file1


$cat file2


To merge the two files so that the final file has all the rows in file1 use

$join -t’,’ -1 1 -2 1 -a 1 -e ‘0’ -o ‘1.1,2.2’ file1 file2


An excerpt from info join

print unpairable lines coming from file FILENUM, where FILENUM
is 1 or 2, corresponding to FILE1 or FILE2

replace missing input fields with EMPTY

obey FORMAT while constructing output line

use CHAR as input and output field separator

join on this FIELD of file 1

join on this FIELD of file 2

Categories: bash Tags:

Useless use of cat

March 26, 2011 Leave a comment

Above link looks dead.

But a search of “Useless Use of cat” gave the following results:

Categories: Interesting Tags: , ,

Writing 7zcat (works like zcat on *.7z files)

March 25, 2011 1 comment

Copied /bin/zcat to a file called /bin/7zcat


exec 7z e -so -bd "$@" 2>/dev/null | cat

Categories: bash Tags: , ,

Insufficiently known POSIX shell features

March 25, 2011 Leave a comment
Categories: Interesting Tags: ,