Install Apache2 with perl and php5 support

Posted by Tom Willett Thu, 24 Jul 2008 19:46:00 GMT

Basic instructions for installing Apache2 on the Basic Debian System.

Basic Debian Server (Etch)

Posted by Tom Willett Thu, 24 Jul 2008 18:26:00 GMT

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.

Amanita cokeri Mushroom

Posted by Tom Willett Mon, 14 Jul 2008 17:03:00 GMT

I ran across this beautiful mushroom in my recent trek through the woods. It was majestic, standing almost 9 inches tall. Beautiful to look at but not to eat.

Amanita Cokeri Mushroom

Sulphur Shelf Mushroom 1

Posted by Tom Willett Mon, 14 Jul 2008 16:26:00 GMT

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).

Sulphur Shelf Mushroom

Right now it is soaking in brine, but I plan on having some of it cooked tonight.

Javascript/CSS page print preview

Posted by Tom Willett Wed, 09 Jul 2008 17:53:00 GMT

I looked around for a simple example of creating a print preview button/link on a webpage. I already had a print.css which handled the printing but my users could not seem to find the print and print preview links on their browsers. Sigh.

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

Posted by Tom Willett Fri, 27 Jun 2008 20:11:00 GMT

I became frustrated with date parsing in Rails and Ruby and so created a user friendly parser for dates. I wanted to avoid a big javascript library or using a date-picker widget. Quite frankly, when I am entering dates, I don't like to have to reach for the mouse and scroll through the dates.

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

Posted by Tom Willett Thu, 19 Apr 2007 15:09:00 GMT

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

Posted by Tom Willett Fri, 13 Apr 2007 18:08:00 GMT

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

Posted by Tom Willett Fri, 16 Feb 2007 16:46:00 GMT

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

Posted by Tom Willett Thu, 01 Feb 2007 15:33:00 GMT

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.

Older posts: 1 2 3 4