I’ve been in the habit of keeping track of things in todo lists using Emacs’s outline-mode. This works great to organize things but I needed a better way to mark completed items. I have the files in source control so I could delete them and still know of them using a diff with a previous version but this is clumsy. Otherwise, I could mark items with a date or a DONE but this gets ugly. instead I have this simple emacs function that takes the current line as moves it to the bottom of the file with the date prepended.
Simple.
(defun mark-completed ()
"Move the current line to the bottom of the file and prepend the date."
(interactive)
(save-excursion
(progn
(move-beginning-of-line nil)
(kill-line 1)
(end-of-buffer)
(if (not (eq 0 (current-column)))
(newline))
(insert-date)
(insert " - ")
(yank))))
Continue reading →
Remembering all the options for wget is the reason for the following function. Add it your .bashrc and then run ‘wget-site URL’ and you’ll get a copy of the site locally for offline browsing
function wget-site {
wget -v -m -w 2 -p -E -k $1
}
Continue reading →
You are trying to access a SQL Server database. It has been setup for integrated authentication. You know this because when you login via a tool like DBArtisan you don’t need to enter a user name or password. Authentication is through Windows itself.
You figure out that you need a specific JDBC url.
For example,
Continue reading →Scenerio:
Using ant to call a taskdef that I created. It should log but needed to get the task to see my log4j.properties files.
In the path definition i put a pathelement who’s location pointed directly at the log4j.properties file. This causes the problem as it seems that Ant tries to open any file on the classpath that isn’t a jar.
Solution
Continue reading →In the directory where you have a collection of tar.gz files.
for FILE in $(ls); do tar -zxvf $FILE; done
Continue reading →