Katipo
Search  
Site Blog
  About  
  Home
About Portfolio Solutions Client Area Contact Us
: : About Us
Awards
Jobs
Our People
What Is A ... ?
Working From Home
News
Photo Gallery
Katipo Blog


Archive for the 'perl' Category

Howto Use Awstats with Nginx and Multiple Ruby on Rails Apps Under Mongrel Clusters

Thursday, May 10th, 2007

I have a host where Nginx listens on port 80 and dishes out requests to various apps depending on what their host name is. It also does appropriate load balancing. Primarily I use this for hosting various instances of Kete Ruby on Rails apps, but I also use it for supporting the subversion repository under Apache and a few other RoR apps, too. I wanted to setup up web log statistics for all of the above and I wanted to do it in such a way that it’s easy to add another web app to view statistics for.

Awstats is wicked easy to setup if you live in the LAMP world, but I could find a decent tutorial that covered my setup. So here goes… (more…)

Use the SkipTransaction Callback in Request Tracker 3.4 to Limit ShowHistory

Thursday, July 13th, 2006

I just finished hacking on RT’s SelfService interface to suit Katipo’s needs. For those of you not familiar with Request Tracker (usually referred to as RT), it is a open source ticket tracker app written in Perl with a very long list of features.

Several of the coolest features relate to how you can add custom code without touching your source distribution. This makes upgrades a much less painful process, but still gives you the flexibility of being able to fully hack the app. Yesterday I used a Callback to exclude certain types of transactions from a ticket’s display of history.

While digging through /usr/share/request-tracker3.4/html/Ticket/Elements/ShowHistory, I found a callback called SkipTransaction. It sounded like just what I needed, but how did it work? A quick search of the RT wiki’s FAQ gave me some simple example code by Oliver Oberlach.

Not much to it. Follow the directions about how to work with callbacks (i.e. create the corresponding file in the right place) and then all it boils down to is setting $$skip to 1 if some attribute of your $Transaction object matches whatever condition suits you. Here’s what it looked like for me:

%# /usr/local/share/request-tracker3.4/\
html/Callbacks/KatipoCallbacks/Ticket/\
Elements/ShowHistory/SkipTransactions
%#
%# What transactions to skip for SelfService interface
%#
%# Walter McGinnis, 2006-07-12

# this should get rid of the display of priority adjustments
$$skip = 1 if $Transaction->CreatorObj->Name eq “rt_cronjob_user”;

$Transaction => undef
$skip => undef

Playing with CGI::Ajax

Friday, June 23rd, 2006

So last night, for the fun of it, I tried to build the Koha opac title search using Ajax. And with the help of the most excellent CGI::Ajax module, I ended up with a module Koha::Ajax which is 138 lines long, most of that is pod and html. (more…)


Katipo
Rachel Snowboarding