Archive for December 2007
pragmatic linker
I decided to maintain a page with links good to know about. It’s like a simple html page with entries like
<a href="blah">blah</a>
It’s very annoying to type the whole skeleton every time a new entry comes. Better to store only the data in a file and generate the output page with a script as advised in e.g. The Pragmatic Programmer book. I prepared two solutions like this.
login08% cat links2html.sh
( echo "<html><body>" && \
cat $1 | \
sed -e 's/^\(.*\)$/\1 \1/' | \
sed -e 's/^\([^\ ]*\)/<a href="\1">/' | \
sed -e 's/$/<\/a><br \/>/' | \
sed -e 's/>\ />/g' && \
echo "</body></html>" \
) > $1.html
login08% cat links-to-html.el
(defun links-to-html ()
(interactive)
(let ((new (generate-new-buffer "*links-to-html*"))
(lines (split-string (buffer-string) "[\n\r]+")))
(with-current-buffer new
(insert "<html><body>\n")
(dolist (l lines)
(insert "<a href=\"" l "\">" l "</a><br />\n"))
(insert "</html></body>\n"))
(switch-to-buffer new)))
login08%
wallz
I’ve never used any wallpaper on my desktop other than defaults. I search for the one and only : ) This is a nice little collection though.
cvs/ssh hell on Windowns
I’m on vacation until 7th of Jan. This time, I’m using a Windows machine. I decided to set up a cvs/ssh/slime environment to work a little on cl-bf. Only 1-11-21 (not 22) cvs worked with sourceforge.
set HOME=d:\z\bin ssh-keygen.exe -C "" set CVS_RSH=path\ssh.exe cvs -z3 -d:ext:grault@cl-bf.cvs.sourceforge.net:/cvsroot/cl-bf com ...
multiple week’s tobacco
Goteborgs Rape No2 White doesn’t have this tobacco flavor. My first snus was General Portion which has a certain taste and this wasn’t present in former. However Skruf is kinda posh but good. I’m also finished with a little bit strong Nick & Johnny. It’s good.
this week’s tobacco
By the way, I found this too aromatic : (
ucw first attempt
I hacked together a very basic application in ucw. It is kinda shopping list. One can add and remove strings by consequently submitting a form and using a link. It took a while to realize (again) that sort was destructive : ) After understanding the basics I mentioned earlier, it’s really straightforward to design simple dynamic pages like this.