Install Apache2 with perl and php5 support
Basic Debian Server (Etch)
I have some new server hardware I am putting into service and since my last round of server building the version of Debian has changed and thus the process has changed.
In order to keep notes for myself, here is the new process. This will be the first of several posts updating how I set up my servers.
Go to Debian.org to get the netinstall image. Below are the details of using the Debian NetInstall disk to get a basic server up and running.
Sulphur Shelf Mushroom 1
It has been very moist and warm around here lately and yesterday I decided to go mushroom hunting in the woods. I was hoping to find some chantrels but I was rewarded with several other finds; the best of which, was this Sulphur Shelf Mushroom (Laetiporus sulphureus).
Right now it is soaking in brine, but I plan on having some of it cooked tonight.
Javascript/CSS page print preview
So I took what I could find and came up with the following method of doing this.
I took the basic method and javascript code from Paul Sowden's article at A List Apart and mixed in my own specifics. Consult this article if you don't understand what I am doing. You should also look at Eric Meyers article at A list Apart on print style sheets if you don't understand creating a print stylesheet.
So here is what I did:
Rails Date Parser
So this is a simple to install simple to use extension to the ruby Date class. To use it simply copy the following code to a file named dateparse.rb and place it in the lib directory in your rails app. Then open up the application controller and and put require 'dateparse' at the top of the file. (Note: put it before the class declaration).
Then in your controller or view code use Date.parse_date() in place of Date.parse(). It recognizes the following formats
YYYY-mm-dd ISO Standard
mm-dd-YYYY American
mm-dd Assume current year
mm/dd/YYYY American standard
mm/dd
mm.dd.yyyy European
dd.mm.yyyy
dd mmmmm yyyy example: 22 may 1945 or 22nd may 1945
dd mmmmm example: 22 may (current year)
mmmm dd yyyy example: may 22 1945 or may 22nd 1945
mmmm dd, yyyy example: may 22, 1945
mmmm dd example may 22 or may 22nd
dd example 4 or 4th
today (tod) or now common names for days and abbreviations
tomorrow (tom)
yesterday (yes)
Next Week, Last Week, Next Month, Last Month, Next Year, Last Year
+n[units] or -n[units]: Date from today: examples: '+22', '+22 days',
'+22d', '-4 weeks', '-4w', '-4week', '+6 months', '+6m', '+6month',
'-2 years', '-2y'
Debian Etch Apache 2.2 and mod_fastcgi
I recently got around to upgrading a server I had running Debian Sarge. The upgrade went fairly well except for Apache 2.2 and mod_fcgi. Apache would not load with the version of mod_fcgi I had been using (2.4.2). So I went looking for the fix.
Bird Feeder Mystery
About a month ago I set out some bird feeders. After a few days the suet all disappeared one day after not much activity. After looking at things I decided it was probably squirrels.
A few days ago, we looked out of the house and say a female red fox eating stuff on the ground under the bird feeder. I wondered at the time if that was what had gotten the suet.
Well I was wrong it was a small coon and I have the pictures to prove it.
 
link_to_sort
I have created a little view helper that I use in my ROR applications. I call it link_to_sort. What it does is create a clickable header on a list page that sorts the list by that header.
I add it to the application helper and make minimal changes to the controller list action and add one routine to the application controller to make it work.
Log4r and Rails 7
In a rails application I am working on I needed to set up logging for the events happening in the system. After a little perusing on the net I figured that log4r was the way to go. Then as with a lot of ruby apps, I found the documentation wanting. Yes I know the api and source is on line but a little more help to get started would be helpful. So I thought I would share what I had gleaned from the various sources and how I got it working.