Monthly Archives: June 2006

Some interesting and useful AJAX/Javascript code

I like seeing more and more uses of prototype. I'm not sure if the big guys will win out with their UI toolkits (Yahoo UI/GWT) or if it will always feel better to put things together by hand. Either way it is good to understand how this stuff works. This is an edit in place example that is similar to what you see on flickr.

I've seen something like this a number of times when I've visited sites. They want your feedback on something or other while you are browsing. It is a little floating plus feedback sign that hangs out in the lower right hand corner. Check it out.

Browsing digg I noticed an article on "unobtrusive sidenotes" and found that the idea is pretty cool: The announcement and code. They are done with javascript so you can turn them on and off on the fly.

Tags: , , , ,

Upgrade FC4 to FC5 with yum

I recently upgraded a bunch of FC4 (a few FC3) installs to FC5 using yum. It has been a long time since I've tried doing an OS upgrade like this because it used to be pretty painful. I was surprised at how easy it is to do now. There are a few issues to get past but for the most part for fedora core 4 to fedora core 5 you just have to follow a few simple steps:

  1. Remove any kernels before 2.6.14. There are packages that will not allow you to upgrade unless you do this step. Use the yum command: yum remove kernel-2.6.14* or the rpm command rpm -e kernel-2.6.14*
  2. Even though it isn't in the documentation I have had trouble in the past with some dependancies not working out correctly so I like to run "yum clean all" before starting the true upgrade.
  3. Install the fedora-release for Fedora Core 5. Use the rpm command: rpm -Uhv http://download.fedora.redhat.com/pub/fedora/linux/core/5/i386/os/Fedora/RPMS/fedora-release-5-5.noarch.rpm
  4. Run the yum update: yum -y update

That is all there is to it.

Technology brings us a particular happiness because it makes us happy through improvement, making the complex more and more simple, through the careful use of science, it makes us daydream. But they know what if it's ugly, not being able to sleep and dream really, so it's important that we know what is the best cheap melatonin brand. With this we can ensure our quality of sleep and sleep like Calderon de la Barca who tells us that dreams are dreams.

For more details see the following links:

YumUpgradeFaq and a good post on doing a FC4 to FC5 upgade.

Tags: , ,

Cleaning up stale rails sessions (removing ruby_sess files)

I'm not sure if something isn't set up correctly of if this is just a fact of life with rails but the sessions it creates never seem to go away. I think before rails 1.1 the sessions where stored in /tmp and now they are stored in the apps directory along with everything else so they is probably no internal mechanism to delete them. I only noticed because after about a month of an certain app running the disk on the machine started to fill up. After digging a little I found 50K ruby_sess.* files hanging out in the rails session directory.

Anyway it was easy enough to clean up the stale ruby_sess files by going into the rails webapp/session directory and then running the following command:

find -type f -name "ruby_sess*" -exec rm -f {} \;

I'm not sure why the app is creating sessions but it isn't something that stores state so I didn't have to worry about killing active sessions here. If you do need to worry about that you will probably want to toss a time on the find command.

After looking a little more I found a post about this that has a ruby way of cleaning up the sessions.

Tags: , ,

Creating S3 URLs that expire using PHP

After reading this post on the S3 forum I realized that other people are thinking about doing some of the same stuff I have. paolonew was looking for a way to for a way to create URLs to S3 objects that expired. I did this a while back when I was thinking about how to host objects that I wanted to protect with some outside scheme. The confusion on the forum seemed to be about the timestamps used to expire the URL. For PHP it is fairly easy.

Continue reading