Archive for the ‘Coding’ Category

timekpr Grows Up ( or “Why I Love Open Source” )

Sunday, September 28th, 2008

Back in February, I had the need to limit the amount of time my kids spent on a shared Ubuntu box. I cobbled together a simple script that would give a warning then shutdown the user session. It worked for me (made my kids unhappy, tho’), but I knew it could be better. Dispite my full knowledge it was a cheesy little script, I posted it on my blog since it fit I need I had as a Dad that I thought others might have.

Well, a number of folks have commented, posted bug fixes and enhancements, even translated it to Hungarian! A few hours ago, one of the folks that had offered others help and enhancements on Ubuntu Forums, Even Nedberg, posted a comment to the old blog entry that he and a friend had converted the script to Python and added a GUI and other cool enhancements.They have even set up a project at launchpad.net to make the code more accessible.

Wow! I have been pretty busy this summer, and couldn’t have hoped to provide these types enhancements, but thanks to the spirit of open source and the need to “scratch an itch”, ‘timekpr’ has grown up, and is on it’s way to becoming a really useful (and needed) tool for the Linux desktop.

.nedberg and forger - Please take this blog entry as my permission to use the name ‘timekpr’ and any code or ideas in the original script (please don’t take the bugs, I’ll keep those!) and just go wild. I know parents will greatly appreciate you efforts!

Rails Tag Helper default values

Wednesday, July 23rd, 2008

I was tooling through a form setting text_field sizes ( the default of :size => 30 is a bit big for me ) and my “cut-n-paste is bad” alarm when off. There had to be a better way to set the form tag defaults. A few minutes on Google and Noobkit provided an answer:

InstanceTag::DEFAULT_*

For instance,

ActionView::Helpers::InstanceTag::DEFAULT_FIELD_OPTIONS = { :size => 15 }

in my environment.rb sets the size of all undefined textboxes to 15 instead of the default of 30. Other defaults include:

{ :discard_type => true }.freeze unless const_defined?( :D EFAULT_DATE_OPTIONS)

{ "size" => 30 }.freeze unless const_defined?( :D EFAULT_FIELD_OPTIONS)

{ }.freeze unless const_defined?( :D EFAULT_RADIO_OPTIONS)

{ "cols" => 40, "rows" => 20 }.freeze unless const_defined?( :D EFAULT_TEXT_AREA_OPTIONS)

12 Step Program for Ubuntu Update-Manager Addicts

Saturday, April 19th, 2008

Hi, my name is Chris.

I am Ubuntu update-manager addict.

I began innocently enough, sometime back in Febuary, I ran ‘update-manager -d‘ to get a peek at Unbuntu Hardy Heron. Since that time I have been unable to resist the little orange “Updates Available” icon. Checking two or three times a day for improved progams, bug fixes, and new features. Swearing off updates after each bad dependency problem, only to run update again in hopes it will get fixed this time.

My family is tired of the home PCs being tied up running update-manager all the time and I’m not getting much done on my laptop while it’s burning up bandwidth updating the repository indexes. It’s time for an intervention.

I know I can’t break this habit alone, so I’m thinking of starting a 12 step program. I know there are others out there with the same problem so maybe a support group will help, all we have to do is: (more…)

How to Limit Daily Desktop Usage in Ubuntu

Sunday, February 3rd, 2008

I have been looking for a way to limit the amount of time my kids spend on the computer. After toying with a couple of different things like timeoutd and pam_time, I decided to hack together something to meet my needs: (more…)

6 Tools for Keeping Kids Safe with Open Source

Thursday, January 31st, 2008

My family uses open source software almost exclusively. Everyone from the toddlers to the teen to the Mrs. have what they need to play games, chat with friends, manager emails, surf the web, keep busy schedules straight, do homeschooling, and pretty much anything they may want to do. (more…)