Christopher Dawson

"As soon as men decide that all means are permitted to fight an evil, then their good becomes indistinguishable from the evil that they set out to destroy."

Clean your broken terminal

this used to happen to me all the time, I would accidently print out binary output or something and the terminal would be jacked. Looks like:

$ reset


$ stty sane

will restore a jacked output terminal. Good to know.


Forgiveness is the final form of love.


The romantic image of an über-programmer is someone who fires up Emacs, types like a machine gun, and delivers a flawless final product from scratch. A more accurate image would be someone who stares quietly into space for a few minutes and then says “Hmm. I think I’ve seen something like this before.”


George Gershwin writing on May 4, 1930 in New York World

"Never in all our history of popular music has there been such a plethora of composers - professional, amateur and alleged... anyone who thinks he can carry a tune - even if it's nowhere in particular - nowadays takes a 'shot' at music making."


Heywood Broun

"Nobody talks so constantly about God as those who insist that there is no God."


arrow 29 April 2009 by Jaymon Let the Right One In

recommended via:
"Just saw, "Let the Right One In". It blew my mind. My mind is still blown. Thanks to those that suggested it. Best Swedish vampire film ever"

arrow 20 June 2009 by Jaymon anime movies to see

Howl's moving castle
Mind Game (good drama) 
Ninja Scroll
Sword of the Stranger
Waltz With Bashir
5 cm per second

Grave for the Fireflies (if you haven't seen it)
Jon-Roh The Wolf Brigade
Wings of Honneamise (old school hand drawn animation, absolutely stunning for a movie released 22 years ago)
Perfect Blue 

Most of Studio Ghibli movies (Spirited, Mononoke, Graveyard, & Moving Castle)
The Girl Who Leapt Through Time (loved it! reminded me of HS days)


arrow 7 March 2009 by litster Emacs & capitalization

M-l: Convert following word to lower case (downcase-word).
M-u: Convert following word to upper case (upcase-word).
M-c: Capitalize the following word (capitalize-word).

arrow 7 March 2009 by litster better search replace

RegExps (also multiline)
and findr package:
interactive replace in multible files (choosing files using regexp)

arrow 7 March 2009 by litster replace with newline

The answer, it turns out, is: C-q C-j.

That's right, Control-J is the way to tell emacs to stick in a newline. In retrospect that makes a lot of sense.

arrow 7 March 2009 by litster Fixing emacs backspace in screen [permalink]
When running emacs insde of screen, screen helpfully turns the backspace/delete key into "^[[3~", which gets turned into a forward-delete. Unfortunately, just bashing deletechar into backward-delete-char-untabify caues backspace in incremental search to cancel the search, which is annoying.

One option is to set the TERM env var to rxvt:

% setenv TERM rxvt

Before cranking up screen.

arrow 7 March 2009 by litster perl nochange

^L for wierd
;?#\|\|\s(\|\(\w\|\s_\)+:[^:]
but cperl-set-style whitesmith is a lie
GNU works, kindof

arrow 7 March 2009 by litster select rectangle

> How do I select rectangular blocks of text in Emacs? For example, in Vim,
> the Ctrl-v command starts Visual mode block-wise.

Found that "apropos-command rectangle" gives the relevant commands.

M-x apropos-command

7 March 2009 by litster indent block

arrow 7 March 2009 by litster tiny tools

emacs tiny tools

arrow 27 July 2009 by litster configuration

init-lun loads line numbers (linum.el)

arrow 27 August 2009 by litster multi-hop tramp

edit a file on another machine locally

arrow 3 October 2009 by litster make caps lock key CTRL key

start gnome-kyeboard-properties->layouts->other options->Ctrl key position

arrow 9 March 2010 by litster Dark Secrets of Emacs Word Wrapping « Learning Lisp

of kind-of the way it is sort-of way. To turn this off, type M-x toggle-truncate-lines. Now you will have a text editor that’s almost as good as notepad with “Word Wrap” turned off!   This should make the wrapping lines extend off the right side of the screen.  Note that this command makes using the SQL mode much nicer… though sql-ms/isql still screws up your column headings with the timer text: “1> 2> 3> 4>”.

One core NotePad feature has only recently become available to Emacs users via Emacs 22. M-x longlines turns the feature on, after which M-x longlines-mode toggles it on and off.  Longlines mode gives you the easy reading soft word wrapping of NotePad with “Word Wrap” turned on.

arrow 15 March 2010 by litster override mode loading - load nxml-mode instead of html-mode

   (fset 'html-mode 'nxml-mode)

arrow 15 March 2010 by litster autoload mode upon file recognition

 '("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"" . nxml-mode))

arrow 15 March 2010 by litster autoload modes for certain files

(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))

arrow 15 March 2010 by litster load file

(load "~/.emacs.d/nxhtml/autostart.el")

arrow 15 March 2010 by litster which mode am I in?

C-h mode

arrow 15 March 2010 by litster cheatsheets

vi <-> emacs

ref card

arrow 30 April 2010 by litster EmacsWiki: Parenthesis Matching

  C-M-f     Move forward over a balanced expression
  C-M-b     Move backward over a balanced expression
  C-M-k     Kill balanced expression forward
  C-M-SPC   put the mark at the end of the sexp.

arrow 30 April 2010 by litster stub for howto automatically comment the end of a block

emacs-fu: balancing your parentheses
(defun paren-match ()
"Tries to jump to the matching parenthesis to the one currently
under the point. Useful if the matching paren is out of sight. "
(cond ((looking-at "[{\[\(]") (forward-sexp 1) (backward-char))
((looking-at "[]})]") (forward-char) (backward-sexp 1))
(t (message "Point not at a parenthesis."))))

I usually bind it to C-x C-p globally.

arrow 30 April 2010 by litster Tutorial: Emacs for Programmers | Linux Journal

arrow 10 September 2010 by litster ubuntu packages


arrow 16 February 2011 by litster OMG! 5.3. XML Validation commands

C-c, C-n
Move to the next location where the document structure is not valid.

Tony Hsieh

"We learned we should never outsource our core competency"

from "Delivering Happiness" pg 118-119

Abraham Lincoln

"Nearly all men can stand adversity, but if you want to test a man's character, give him power."