Author Archives: Karl

Qwest Will Not Block 3rd Party Billing

I was reading a story on ars technia today about a guy’s difficulties in removing 3rd party billing from his phone bill. A practice known as cramming. Cramming is where obscure companies place billing charges on your phone bill, using your carrier to do the billing. For example a company called MyScamBilling could put charges on your phone bill with no authorization from anyone, with no verification that the billing is even legitimate. And you phone company will require you to pay it, or possibly send you to collections. Sweet.

The hope is that consumers just become frustrated and pay the charges, or they may not even notice them at all if the charges are small. And good luck getting them to even stop. They guy in the article called all the companies and asked them to stop. Low-and-behold… they didn’t stop, they just kept billing.

Continue reading

Posted in Peeves. Tagged with , .

[UPDATE] Capistrano Deploy for Shared Hosting with GIT Repository

Like I said in my original post Capistrano Deploy for Shared Hosting with GIT Repository, I would add the ability to rotate log files and backup your database. Also added a couple of niceties while I was at it.

  • Updated for Capistrano 2.3
  • Added backup of mysql database to local machine
  • Added log rotation and backup to local machine
  • DRYed things up just a touch (delete_files, delete_directories)

Just run a ‘cap -T’ to see all the new functions.
[sourcecode language=”ruby”]
cap -T
[/sourcecode]

CAP db:backup

‘cap db:backup’ will execute a mysqldump, so obviously, this only works on mysql databases. But you could adapt that to any db fairly easily. It dumps the file and bzips it and then downloads it into a ‘/backups’ directory in your project.

Continue reading

Posted in Rails. Tagged with .

Coolest Ceiling Fan – EVER

Since the summer it a slow time for me, and I have the kids at home all day long (except when they are at VBS), I’ve decided to remodel the boys room. Well, actually it was never really ‘modeled’ in the first place, so I guess you can’t remodel it.

In any case, my boys love planes. We try to attend any air shows that come around. About 18 months ago we went to see the Blue Angels. Ever since, the boys are fascinated with air planes. So I thought a plane or hanger motif would be just the ticket for them. As I searched the net for ideas, I came across one of the coolest ceiling fans I have ever seen. Wow! The Craftmade WarPlanes ceiling fan comes in three models that really look like the whole front end of an air plane. The one on the right is the Tiger Shark (links to hi-res image). There is also the Glamorous Glen and Miss America. A little poking around and it’s fairly easy to find under $200. Not bad.

We have six Craftmade fans in our house and have been extremely pleased with their performance and reliability. After neary 12 years of 24/7 use, they are all quiet and really move some air, so I know the quality of these fans are very good.

I’ll post some pix as the project progresses.

PS- if you have any ideas for decorating a boy’s bedroom (ages 5-7), please let me know with a comment.

Posted in Home Decor. Tagged with .

Butt Biter: Fix State Abbreviations && Large Data Set Updates

Ran into a little butt biter today… I imported a few thousand addresses that had the state in long form, like ‘Arizona’. But I commonly used the us_states plugin for popup selection of states. Well, us_states will be looking for state abbreviations, like ‘AZ’ when it selects it’s selected value. So what’s a girl (or dude) to do? You gotta convert them states!

But there are a few concerns:

  • you need to iterate over a large set of records, maybe an entire table
  • there may be memory issues with loading such a large set

The following rake task demonstrates a technique that is more memory efficient than loading the entire model/attributes (table/fields) into memory. Only load the ‘id’ and ‘state’ attributes when you need to find your initial record set. The ‘id’ will be used to find the record for updating, and the state is need to find the new abbreviation.

Continue reading

Posted in Rails. Tagged with , , .

Disappointed with SmartHome Quality

My home it pretty well automated. By that, I mean that our security system, an Elk M1-gold, can control the house lighting, thermostats, and drip irrigation system. Lights come on and turn off automatically as necessary. The ELK uses a expander device which connects to an INSTEON controller. The INSTEON controller has the ability to turn on/off/dim any light in our house that has an INSTEON switch. When it works, it’s great. When it doesn’t work, it really sucks.

So then, why doesn’t it work? Well, it seems that the Smarthome engineers forgot to spec quality components as the failure rate of most of the INSTEON and ICON (a cheaper version of the INSTEON switches) is over 50%. That’s right, more than half of INSTEON switches have failed, they either do not turn off, or they will not turn on. Nice.

Continue reading

Posted in Home Automation. Tagged with , .

VBSfinder.com Is Up and Running

I’ve been working on a Rails app on-and-off for a couple of months, and it’s ready for human consumption. VBSfinder is a site where families can find vacation bible schools near them. Only problem is I need people to enter VBSs that they know about. So if you know of one, please take a minute to enter the event information so that other can search.

There are quite a few features that are not ready yet, like the mapping interface. But I wanted to get the site up and functional so that people can start using it. I’ll get the frosting on the cake later.

Comments or complaints are always welcome.

Posted in Uncategorized.

Capistrano Deploy for Shared Hosting with GIT Repository

Would you like to deploy your Rails apps on a shared hosting account via Capistrano? I keep a couple of small projects on A Small Orange and since I update them so infrequently, I can never remember all the steps. Duh, that’s what Capistrano was made for. So I took a night and wrote the following deployment script. There are a couple of requirements:

  • Your project is in a GIT repository, local or remote.
  • The GIT repository only needs to be accessible from your local machine (ASO servers do not support GIT).
  • WARNING: running any part of this script will completely delete your /public_html directory!
  • You only need modify the first FOUR ‘set’ lines.

A shared/system_stopped directory will be created on the server, any files in here will be served when you do a ‘cap deploy:web:disable’. You can add a ‘system_stopped’ directory to your project and those files will automatically be copied into the shared directory.

This script works best if you start from the beginning as this is a new deployment as a couple of directories need to be created:

There are a few commented out lines that you may wish to uncomment. I tried to explain their use, so you may wish to read over each function.

Lest I repeat myself… WARNING: this will completely delete your /public_html directory! Make sure you have a backup before you run any function in this script.

I plan on adding a full db backup option (run before migrations, or at will) and a production.log rotation.

Posted in Rails. Tagged with , , .

Start of a new blog…

What can I say that hasn’t already been said. “Welcome to my blog” seems to sum it up fairly well.

A little preview of what you will be seeing here:

  • Ruby and Rails odd and ends
  • CSS and HTML/XHTML bit and pieces
  • Some ranting on about the mentally deficient of this world
  • Advice to other fathers that work at home and are the primary caretaker of their offspring

That pretty much sums it up. Stay tuned, better yet, grab the feed.

Posted in News.