Archive for the ‘Uncategorized’ Category

Install Phusion Passenger / mod_rails on a cPanel host

Tuesday, April 13th, 2010

I recently had occasion to set up Passenger/mod_rails on a cPanel server. There is some varying and dated information around the web, so I thought I would share current best practice:

First you’ll need to SSH to your server and perform all the following commands as root or via sudo:

$ su

Let cPanel set up Ruby and Rails the way it wants:

$ /scripts/installruby
$ /usr/local/cpanel/bin/ror_setup

Install passenger the normal way (see Passenger docs):

$ gem install passenger
$ passenger-install-apache2-module

Create /usr/local/apache/conf/passenger.conf with the lines that the Passenger install script tells you to add to your Apache configuration file, e.g.:

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11
PassengerRuby /usr/bin/ruby

Include the Passenger config by editing /usr/local/apache/conf/httpd.conf and, somewhere near the beginning, adding:

Include "/usr/local/apache/conf/passenger.conf"

We want to make sure cPanel preserves our edits to httpd.conf when it does updates, so we need to run:

$ /usr/local/cpanel/bin/apache_conf_distiller --update --main

Restart Apache with

$ /scripts/restartsrv_httpd

Upload your Rails app to somewhere outside of public_html (e.g. ~/rails_apps/yourapp) or use cPanel’s “Software / Services > Ruby on Rails” functions to create a new one.

Login to your domain’s cPanel and go to “Domains > Subdomains”
Create a new subdomain whose document root is path/to/yourapp/public
Make sure it’s pointing to yourapp/public

Visit your subdomain and see your app running — easy!

Free Linux time tracking software

Tuesday, January 19th, 2010

I was reviewing my time tracking arrangements and thought I would share the results of my search for a better solution. I had specific requirements, so this isn’t for everyone, but I hope it might be useful to some. Results are ordered by my entirely unscientific rating system.

If you know of any I missed, let me know in the comments.

Required for consideration

  • Free
  • Runs on Linux
  • Access to data store (no proprietary web services)
  • Easy start/stop of tasks (i.e. don’t have to manually enter start and end times)

Important

  • Cross-platform
  • Open source
  • Work offline
  • Manually add/edit time
  • Nestable items
  • Export reports of total time spent on an item with breakdowns

Desired

  • Stop tracking activity when computer is idle or off
  • Reminder of current activity
  • Nice graphical reports
  • Tagging
  • Collaboration

Kimai

Pros:

  • Open source
  • Slick interface
  • Easily manually add or edit time entries
  • Tasks are assigned to projects, which are assigned to customers — this is as good as nesting, for me
  • Export reports filterable by customer, project, or task to PDF, XLS, CSV, or HTML
  • Same task can be tracked against multiple customers — as good as tagging, for my purposes
  • Multi-user, web-based
  • Freelance/consultant-specific features: rate, expenses, location, and total cost in reports

Cons:

  • Can’t work offline if installed on a remote server
  • No idle/off detection
  • No reminder of current task
  • No graphical reporting

Verdict: +8 / -4
Solidly fits my working requirements in a very nice interface, though I’ll have to consider whether I want to use it as a local installation and not enjoy its multi-user capabilities or install it on my server and not have access to it offline.

Project Hamster

Pros:

  • Open source
  • Easy, intuitive interface
  • Manually add/edit time easily
  • Nice graphical reports
  • Exportable reports
  • Configurable idle/off detection
  • Configurable reminder of current activity
  • Tagging (in repository)

Cons:

  • Not very cross-platform — only partial Windows compatibility, main focus is the Gnome desktop environment
  • Limited to one level of categories
  • Export totals per task only, not category
  • No collaborative capabilities

Verdict: +8 / -4
Does most of what I need it to do, and with a pretty good interface to boot.

Rachota

Pros:

  • Open source
  • Tagging, of a sort (spaces in the category field of a task cause it to be assigned to multiple categories at once)
  • Configurable idle/off detection (in development build)
  • Decent, filterable reporting
  • Exportable reports configurable by time period and filterable by task

Cons:

  • Sometimes confusing interface
  • Can’t easily add/edit time (coming in next version?)
  • Only one level of categories
  • Idle detection doesn’t really work, off detection doesn’t work all the time
  • No reminder of current task
  • No collaborative capabilities
  • Doesn’t exit gracefully when the computer shuts down

Verdict: +5 / -7
The interface isn’t great, but the real killer with this one is its inability to manually add or edit time. Hopefully this will improve as development progresses.

TimeSlotTracker

Pros:

  • Open source
  • Manually add/edit time
  • Nestable tasks
  • Export report of total time spent per task, filterable by date and parent task, to HTML, TXT, and CSV
  • Export customizable via XSLT

Cons:

  • No graphical reports
  • Clutters up home directory with non-standard files
  • Default export templates are unappealing
  • Configurable current task reminder which sadly doesn’t seem to work
  • No idle/off detection
  • No tagging
  • No collaborative capabilties

Verdict: +5 / -7
A simple cross-platform, open source time-tracker with limited export options and reporting; its inability to nest items and poor reporting won’t work for me.

Klok

Pros:

  • Nice interface
  • Great calendar view to easily add/edit/visualize time
  • Pie chart reports with easy drill-down
  • Nestable tasks

Cons:

  • Bugs (activity is sometimes saved with zero length)
  • Can’t export reports, only weekly or monthly time sheets (not overall project totals)
  • Not open source? Can’t find license or source code
  • No idle/off detection
  • No reminder of current task
  • No tagging
  • No collaborative capabilities (apparently coming in next version)

Verdict: +4 / -7
Despite the pleasantly useful interface, the shortcomings (namely the occasional bug and lack of report exporting) mean it doesn’t fulfil my needs. Those who don’t need the exporting or other features may enjoy it, however.

Time-Tracking-Tool

Pros:

  • Tasks can be nested
  • Report on total time spent filterable by task and time period
  • Save application data for reopening elsewhere
  • Edit recorded time for a task

Cons:

  • Not open source? Can’t find license or source code
  • Reports overly simplistic, don’t handle subtasks well
  • Can’t export reports
  • Can’t view or edit start and end times of activity
  • No tagging
  • No idle/off detection
  • No reminder of current task
  • No collaborative capabilities

Verdict: +4 / -8
Perhaps useful for those who like simplicity, but the uncertainty around its license and its omissions make it a non-starter for me.

Baralga

Pros:

  • Open source
  • Save application data for reopening elsewhere
  • Manually add/edit time

Cons:

  • Interface clunky in places
  • Can’t nest tasks/projects
  • Can’t export reports, only an Excel spreadsheet or CSV file containing time spent per project per day
  • Only one, limited visual report
  • No idle/off detection
  • No reminder of current task
  • No tagging
  • No collaborative capabilties

Verdict: +3 / -8
A simple cross-platform, open source time-tracker with limited export options and reporting; its inability to nest items and poor reporting won’t work for me.

Other options

These are a couple that piqued my interest but weren’t worth trying out because of a lack of cross-platform compatibility.
Windows-only:

Google Maps Navigation: sat nav/GPS for Android

Wednesday, October 28th, 2009

Official Google Blog: Announcing Google Maps Navigation for Android 2.0

Google just announced their own sat nav/GPS software for Android phones,
based on Google Maps — how cool is that? This will probably change the
sat nav market quite a bit: no more paying for map updates, for one
thing, and sat nav developers will have to come up with new features to
get people to pay for their software rather than going for the free
Google app, which sounds pretty feature-laden itself.

I’ve been wanting one of the HTC Android phones for a while now, and this just intensifies the desire tremendously.

64-bit Lightning 1.0pre builds for Linux

Monday, October 5th, 2009

Update: An official 64-bit build of of Lightning 1.0 beta1 is now available.

Ever since I switched to 64-bit Linux, I’ve been looking around for up-to-date 1.0pre builds of the Lightning calendar extension for my Thunderbird 3 mail client, as Mozilla for some reason does not provide 64-bit builds. For a time I was using a build from zaera-holo.net, but it was never updated and the site now appears to be down. Finally, from a comment on the Lightning AMO page, I found a new build from Friday, which appears to work well. Hope this helps others out as well.

If anyone finds a more regularly-updated channel, please let me know.

Adobe AIR on 64-bit Linux

Tuesday, September 29th, 2009

Was installing AIR last night on my nice new Studio XPS 13 laptop, recoiling in horror at Adobe’s workaround installation instructions for 64-bit Linux, when I found these simple instructions:

Install Adobe AIR Linux 1.5 on 64-bit Linux distributions

So Adobe has this knowledge base article — Install Adobe AIR Linux 1.5 on 64-bit Linux distributions — to describe how to install Adobe Air on 64 bit linux systems. Do yourself a favor — just install wine from the standard repositories, and then execute the last line in the instructions:

sudo cp /usr/lib/libadobecertstore.so /usr/lib32

Wine already sets up a complete 32bit compatible environment, so you
don’t have to worry about manually breaking out shared libraries.

Much easier.

Courtesy of the MC Studios blog.

the right to an education

Friday, April 13th, 2007

I received an e-mail today from Our Education, a group pushing for education reform, whose stated purpose is “a constitutional amendment to guarantee all American children the right to a high quality public education.” My first reaction was to think that a constitutional amendment is not necessarily the best solution, but they make a few compelling points.

We think of education as a right at this point, but it simply is not, in a national sense. OurEd points to a Supreme Court ruling which states that “Though education is one of the most important services performed by the State, it is not within the limited category of rights recognized by this Court as guaranteed by the Constitution.” This case specifically addresses the gap in education caused by differences in wealth, and the Supreme Court says that there is nothing in U.S. law that can do anything about it. I don’t want to get too preachy here, but you see the point — disadvantaged children remain disadvantaged because they don’t have a right to education that is equal to rich kids (or even middle-class ones!).

It is true that every state guarantees a free education, but how many of us have looked back and cursed our terrible public school education? Or vice versa — gone to college and wondered why some people never seem to have learned any basic math, history, or how to write an essay longer than a page? The fact is that educational requirements are wildly disparate between individual schools and even entire states, and this is why Americans on average come out as such morons against other countries with better national requirements.

When the Constitution was first created, formal education was still in its infancy, but now it is widespread and essentially a requirement for many parts of life. There is simply no denying that education not only directly affects a person’s ability to maintain their life and liberty and to pursue happiness, but is also crucial to the survival and advancement of the human race as a whole.

Certainly federalizing education will cause problems, but the current system has its own problems that cannot be solved as it stands. Certainly a constitutional amendment is an incredibly dramatic and powerful answer, but education IS that important. And, I mean, it’s not as if it hasn’t been done before. With stupider things. Remember Prohibition? We’ve already created two idiotic constitutional amendments dealing with alcohol — because that’s the most harmful thing on the planet, right? — I’m sure we can manage just one that addresses education, which is surely one of the most important issues of our time.

Anyway, that was a bit of a rant. And I haven’t even touched arts or sex education yet…

NM to AZ

Saturday, July 29th, 2006

I’m getting a little behind in posting entries because I haven’t had time and been too knackered in the morning and evening. On average, we’ve been getting up about 7:30 in the morning and getting to a motel around 11 at night, which has made for long days. Thursday, we left Albuquerque, New Mexico for Flagstaff, Arizona. One of the most interesting things about driving across the country is that you get to see the land change gradually: from lush, green, forested hills in the east; to flat, brown-green plains in the midwest; and now to a land of flat brown dust and rock, dotted with small, dull green bushes, and vividly intersected by towering red outcroppings of rock. I’d carry on describing the land and such, but we’re in a hurry to get out the door and go see the Grand Canyon. Here are some photos from Thursday; I’ll try and post photos from yesterday tonight.

Our main stop along the way to Flagstaff was the Petrified Forest/Painted Desert national park. Arizona really has such stunning land and vistas. Photos do it poor service, of course, but at least you can get an idea of what I was looking at. Visibility out here was about a hundred miles. They said on a good day you could see a set of peaks 120 miles away.
The Painted Desert

Dad, the consummate photographer, capturing the dramatic view.
Dad photographing the Painted Desert

Another gorgeous thing about Arizona is the beautiful sky. The air is dry and clear, so sun is bright, the sky is a vivid blue, and the clouds look like paintings.
Arizona sky over the Painted Desert

A tumble of petrified logs. The petrified wood isn’t that impressive at first glance, because it looks quite like normal wood from a distance. On closer inspection, though, it’s remarkable how the giant pieces of wood have completely turned to stone. Unfortunately, a lot of the most colorful crystals were stolen in the late 19th and early 20th century by tourists and people selling gems. They even blasted apart a number of the logs in order to get at the best crystals inside.
Petrified wood in the painted desrt

A closer view of some petrified wood. This area is called the Crystal Forest, but much of the color that gave it its name has been stolen.
Petrified wood from the petrified forest

Finally, a gorgeous sunset to end the day well:
Arizona sunset over the painted desert

These were only one-thirtieth of the photos I took that day, incidentally.

TX to NM

Thursday, July 27th, 2006

Yesterday we did 300-some odd miles from Amarillo to Santa Fe and Albuquerque.

Our first stop was the “Cadillac Ranch,” just outside of Amarillo.
My dad at the Cadillac Ranch

It consists of 10 old graffiti-covered Cadillacs half-buried nose-first in the ground and was created by an artists’ collective in the 70′s. They are occasionally repainted and people are encouraged to add graffiti.
One of the Cadillac Ranch cars

Next, we crossed over into New Mexico and stopped in Tucumcari for lunch (and ice cream!). This is the Blue Swallow in Tucumcari, a recently restored motel on Route 66:
Blue Swallow motel

After lunch, we turned northwest towards Santa Fe. About 20 miles before, we stopped off at the Pecos National Historical Park, which contains the ruins of an old Pecos pueblo.
A reconstructed Pecos pueblo kiva

The sky was quite dramatic at this point, as there was a storm in the distance. Because there aren’t a lot of hills or trees, we could see the lightning from quite far away.
New Mexico sky

We arrived in Santa Fe and took a walk around its small but lovely downtown. Most all the buildings are done with a Pueblo-style facade.
Downtown Santa Fe

I tried to take some artsy photos:
Bee with Santa Fe's St. Francis in the background

This is the St. Francis of Assissi Cathedral in Santa Fe. Notice the unfinished steeples.
St. Francis of Assissi Cathedral in Santa Fe

We had dinner at a Spanish restaurant called El Messon, at which my dad criticized the paella heavily, then headed down to Albuquerque for the night. The drive south was very interesting, as there was a storm hitting Albuquerque. The lightning was frequent and extremely impressive against the night horizon; it was a terrific light show. Once in Albuquerque, it suddenly started hailing on us, which was quite a surprise to me, considering the temperature. After that, the rain got so thick that I couldn’t even see as I drove, and traffic slowed to a crawl of blinking hazard lights. We made it through those patches, though, spent the night here, and today we’re off to Arizona to see the Painted Desert and the Petrified Forest!

OK to TX

Wednesday, July 26th, 2006

Yesterday we traveled across Oklahoma and into Texas, to stay at Amarillo for the night. Was a bit of a longer leg than I thought, almost 500 miles, so we saw some things but arrived too late for others (Route 66 Museum, unfortunately).

Motel sign
The signs of Route 66.

Vinita McDonald's
The largest McDonald’s in the world by square footage (something like 29,000 I think?). It actually spans I-44 in Vinita, OK like a bridge.

Totem pole
Apparently the largest totem pole in the world, at 900 feet tall. This man, Ed, spent around 15 or 20 years building the thing, as well as a variety of other artwork around his house and just showing it off to passerby.

The Big Texan steak house
We stopped for dinner at The Big Texan steak house. Their gimmick (advertised on billboards all the way from mid-Oklahoma) is a massive 72 oz. steak which, if you can eat it in under an hour, you get free. We didn’t try it, and judging by the big empty chairs next to a table with a 60-minute timer in the middle of the room, neither did anybody else who was there. It’s a very chintzy place, as you can tell by the outside. Inside, it is decorated a bit like a saloon: everything is wooden, animal heads are mounted along the balcony, and waitresses are dressed in either hoop skirts or mini-skirts, flannel shirts, and cowboy hats. The food was good, though.

gettin’ my kicks

Tuesday, July 25th, 2006

After the frantic, last-minute packing preparations that always precede my journeys and the hour of sleep followed by 12 hours and 688 miles of monotonous travel across Connecticut, New York, Pennsylvania, and Ohio, the second day was better, albeit longer, and we’re finally on Route 66. After staying the night in Dayton, OH, we crossed Indiana and Illinois in shorter order and stopped off at St. Louis to see the arch and grab some lunch at the Old Spaghetti Factory.

(Click for larger images:)
St. Louis sculptures
What a funky welcoming committee!

St. Louis Gateway Arch
The Gateway Arch, just as you’ve seen it in photos a million times before. Only this time it’s my photo :)

Dad and the arch
My Dad, master of the Arch!

Dad next to the arch
The Arch is reeeeallly big!

Ted Drewe's Frozen Custard
Our next stop was Ted Drewe’s Frozen Custard, a semi-famous mini chain out here. Their standard is the “concrete,” a cup of frozen custard mixed with any flavor you want. As for what frozen custard actually is, the best way I can describe it is to say that it’s like soft ice cream, except smoother and thicker. When they serve you the cup, they turn it upside down to show you it doesn’t fall out. So, I went for a regular raspberry concrete and it was delish. Sitting on a bench nearby, we enjoy our concretes and marvelled at the quantity of people passing through — its quite a popular place.

Meramec Caverns light show
Our final sight-seeing stop for the day was Meramec Caverns, a 26-mile cavern system west of St. Louis. It was pretty cool, but not as impressive as I hoped and far too cheesy. They do an “impressive light and musical display” at the end of the tour that actually consists only of an old recording and the tour guide manually flicking a few lights on and off — the finale is what can be seen in this photo. I wasn’t surprised when I later saw a photo of the cave’s owner wearing a leopard pattern smoking jacket.

All the sight-seeing made for an even longer day yesterday, as we did the same amount of mileage in addition to the stops, but from here on out we’re only doing about 300 miles a day and more sightseeing. Today: Oklahoma and Texas!