Brad Lucas

Programming, Clojure and other interests

Mail Contents Of File

October 13, 2008

A tip:

If you have a file ‘names.txt’ and want to mail the contents to yourself.

$ mail -s “My subject here” myself@foo.com < names.txt
Continue reading →

Congratulations You Could Survive For 60 Seconds

September 24, 2008

I could survive for 60 seconds chained to a bunk bed with a velociraptor

Continue reading →

Cure For Reddit Addiction

July 29, 2008

If you find that you are reading reddit far too much and need something to help you stop try the following.

  1. Install the Redirector Firefox plugin.

https://addons.mozilla.org/en-US/firefox/addon/5064

  1. Select Tools -> Redirector and set up a redirection as follows
Continue reading →

Simple Log4j Properties File

July 8, 2008

log4j.debug=true

# Set root logger to DEBUG and add an appender called A1.
log4j.rootLogger=DEBUG, A1

# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender

# A1 uses PatternLayout
log4.appender.A1.layout-org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
Continue reading →

Local Browseable Copy Of Sicp

June 13, 2008

Instructions

  1. create a directory where you want to download into
    $ mkdir ~/sicp
    
    $ cd ~/sicp
    
  2. Use wget to mirror the site to your local directory
    wget -v -m -w 2 -p -E -k http://mitpress.mit.edu/sicp/full-text/book/book.html
    
  3. Load the following file in your browser
    ~/sicp/mitpress.mit.edu/sicp/full-text/book/book.html
    
Continue reading →