Migrating a PHP database to a new Rails application

After rewriting most of a PHP application in Ruby on Rails, I realized I had a problem with the database.  How to I get all the data from the database and put it into my rails database?  The easy answer would probably be to copy it all into the /db/seeds.rb file and just migrate.  But […]

HAML and jEditable

One of the problems with jEditable and HAML is that HAML puts whitespace in the form automatically.  So my HAML script looks like this:

The problem with this in jEditable is that now once the user clicks on it, there is gobs of white space around the word.  To get rid of this you […]

jquery ui tabs and the back button

For the site I help out with, xcat.sf.net, I used jquery-ui tabs.  The only issue I had was that I couldn’t do back button, and I started getting a few complaints from it… So, after about 20 minutes of investigation, here is the code I used to make it work.  It works pretty well for […]

CSS container tricks

In CSS I always forget that when creating a box to put things in you want the box to expand with the contents that are inside of it.  The secret to this I found out last year was to put overflow: auto in. Example:

The other trick was to put margin: 0px […]

php system log in

I’m trying to make a php program that will authenticate users based on if they have a userid on the system.  In my environment my system has a number of users who can just ssh into the machine if they want.  But I am trying to make some applications available via a web interface. I […]