Archive for June, 2005

script.aculo.us

Wednesday, June 22nd, 2005

script.aculo.us provides you with easy-to-use, compatible and, ultimately, totally cool JavaScript libraries to make your web sites and web applications fly, Web 2.0 style.

Multiple IIS Virtual Servers on XP Pro

Wednesday, June 22nd, 2005

One limitation with running IIS on Windows XP Pro is that you are limited to running only one virtual server. Steve Cohn has figured out a way to have Multiple IIS Virtual Servers on XP Pro.

Installing Lighttpd on Mac OS X Tiger with DarwinPorts

Wednesday, June 22nd, 2005

As I mentioned in my previous post, Ruby on Rails prefers running under FastCGI processes. For most of us, that means installing mod_fastcgi under Apache. But an even better solution is to run a relatively new webserver named lighttpd.

From their site, they state that:

lighttpd a secure, fast, compliant and very flexible web-server which has been optimized for high-performance environments. It has a very low memory footprint compared to other webservers and takes care of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth, Output-Compression, URL-Rewriting and many more) make lighttpd the perfect webserver-software for every server that is suffering load problems.

It is also the best solution for running Rails applications as it provides for faster execution of Rails scripts and it load balances very easiliy.

At this time, lighttpd is only available for *nix operating systems. If you run OSX, Installing Lighttpd on Mac OS X Tiger with DarwinPorts is a great place to start.

Ruby on Rails Officially Supported by DreamHost

Wednesday, June 22nd, 2005

One of my concerns around developing sites in Ruby on Rails has been the lack of hosting companies that support the technology. Textdrive has been the official hosting company of Rails and a few others have been offering limite support.

Dreamhost has provided limited support by allowing Rails to run as a CGI process. The problem with Rails on a regular CGI process, is that it is very slow, due in large part to the fact that the CGI engine must be stopped and started for each request. The recommended solution is to run Rails on FastCGI. FastCGI is a method of making cgi scripts faster by allowing them to remain running between web requests.

Here are some specific links that explain Dreamhost and Ruby on Rails:

There is also a nice script which installs currrent versions of ruby and rails locally in your home directory

If you just want to poke around with Ruby on Rails, you can signup now and enter the promotion code dmm to recieve a $60 discount off your first year of hosting.

Setting up a SFTP Server on Windows

Saturday, June 18th, 2005

I recently had to create an SFTP server on our work development system, and after doing a fair bit of Googling on the topic found a good solution. The solution is a combination of research done at differnt sites. It is this solution that I am sharing in hopes that it will help someone else.

This tutorial will help you turn your Windows based system into a SecureFTP server.

Background

Secure Shell (SSH) is a program that lets you log into another computer over a network, to execute commands in a remote machine, and to move files from one machine to another. It provides strong authentication and secure communications over insecure channels. When using ssh, the entire login session, including transmission of password, is encrypted and therefore is very secure.

You may have noticed that many webhosts allow ssh access. This means that you can login to their webserver and execute many UNIX commands (the ones they allow you access to) on your account. Not only can you connect to other computers that provide SSH access, but you can also allow others to connect to your computer using SSH.

To take this one step further, you can also turn your Windows PC into a Secure FTP (SFTP) server. SFTP is a program that uses SSH to transfer files. Unlike standard FTP, it encrypts both commands and data, preventing passwords and sensitive information from being transmitted in clear text over the Internet. It is similar to FTP, but because it uses a different protocol, you must use a FTP client that supports SFTP (more about that later).

Installing SSH on Windows

Most UNIX based systems (Linux and OSX) come with SSH preinstalled, so connecting to a remote host is very easy. However, if you run a Windows system, you need to download some additional software to make the SSH programs available to you. Fortunately a free open-source project called SSHWindows, provides a nice Windows installer that will setup the SSH client and Server on your system.

Your first step will be to download the Binary Installer Release from SSHWindows. Once downloaded, run the installer and be sure to install both the client and server components.

Configure the SSH Server

In this next step, I have summarized the information that is included with the readme.txt that is included with SSHWindows (it can be found in c:\program files\openssh\docs)

Your first configuration step is to set up the passwd file. You will need to set up the passwd file before any logins can take place.

Passwd creation is relatively easy and can be done using two programs that are included with SSHWindows – mkgroup and mkpasswd. Both of these programs are located in the c:\program files\openssh\bin directory.

To begin creating the group and passwd files, open a command prompt window and navigate to the c:\program files\openssh directory.

You must first create a group file. To add all local groups on your computer to the group file, type the command as shown below:

mkgroup -l >> ..\etc\group

You will now need to create a passwd file. Any users in the passwd file will be able to log on with SSH. For this reason, it is recommended that you add users individually with the -u switch. To add a user to the passwd file type the command shown below:

mkpasswd -l -u username >> ..\etc\passwd

NOTE: the username specified above must be an existing windows login account.

Creating Home Directories for you Users

In the passwd file, you will notice that the user’s home directory is set as /home/username, with username being the name of the account. In the default install, the /home directory is set to the default profile directory for all users. This is usually c:\documents and settings.

If you want to change this location you will need to edit the passwd file. The passwd file is in plain text and can be edited in Notepad or any text editor. The last two entries for each user are safe to edit by hand. The second to last entry (/home/username) can be replaced with any other directory to act as that user’s home directory. It’s worth noting that when you run SSH on windows, you are actually running SSH in a scaled down version of cygwin, which is a Unix emulator for Windows. So, if you will be placing the user somewhere outside the default directory for their Windows profile, you will need to use the cygdrive notation.

To access any folder on any drive letter, add /cygdrive/DRIVELETTER/ at the beginning of the folder path. As an example, to access the winnt\system32 directory on the *c:* drive you would use the path:

*/cygdrive/c/winnt/system32*

Connecting to your SFTP Server

To connect to your new SFTP server, you will need to download an FTP client that supports SFTP. I use Filezilla which is a nice free FTP and SFTP client. You might also try WinSCP which is another free SFTP client.

To test if your server is running, create a new connection in your client and specify SFTP as the server type, 22 as the port, and localhost or 127.0.0.1 as the server name. You will also need to provide the user account and password for any account that you added to your passwd file. Now connect to the server. If all went well, you should see a directory listing where you pointed the home folder to. If not, there are a couple of things to check. Make sure your Windows firewall is set to allow traffic over port 22 and finally double check your passwd file to make sure that the account you added is actually there.

Security

Because SSH allows access to only Windows user accounts, you can restrict access based upon NTFS file permissions. As such, SFTP does not provide for chroot jails (a Unix method for locking a user to his/her home directory). Simply lock down your filesystem for that user, and SFTP will respect that.

Summary

In the end, setting up an SFTP server turned out to be a very effortless task. With a couple of open source programs and a couple of command-line commands, you can up and running in no time at all!

Fast-track your Web apps with Ruby on Rails

Friday, June 17th, 2005

IBM DeveloperWorks has a nice article/turtorial titled – Fast-track your Web apps with Ruby on Rails . The article begins by explaining that:

Ruby on Rails is a recent entry into the world of Web application development that is rapidly gaining mindshare, even while still in beta versions. Rails succeeds by automating the creation of the most common types of Web applications while not straightjacketing you if you want to add custom or atypical requirements. Moreover, compared to many Free Software libraries that perform individual aspects of a Web application, Rails contains a nicely integrated set of tools for all aspects.

Color synthAxis

Friday, June 17th, 2005

Color synthAxis is a cool Flash application that will help you create and experiment with color palettes. Be sure to check out the tutorial before you begin!

Laser Transmitted Audio

Friday, June 17th, 2005

Here is a cool how-to on Transmitting Audio Signals with a Laser Pointer. It sounds very cool that you can use a simple laser pen pointer, a few misc parts, and about 15 minutes to make a simple laser communicator that converts a sound source into light that travels across a room, and back into sound with very little quality loss.

Things I Would have Blogged about in College

Thursday, June 16th, 2005

Inspired by this post here are the ten things I would have blogged about in college:

  • Turbo Pascal
  • Slum lords and getting evicted (more than one post)
  • Stealing the Pole Position video arcade game from the back of a pickup truck (we were drunk!) that gave me and my college friends hours of fun!
  • How I the hated soft rock that my good friend Carolyn played all night long while I was trying to sleep on her futon. She died a few years later in a tragic boating accident and still remains dear in my heart
  • My Uncle Walt whom I lived with my first year and who shaped my political beliefs forever
  • Expo 86 (in Vancouver) lots of great times and experiences
  • Purchasing my first CD player with my student loan (this was the start of my desire to be on the bleeding edge)
  • Early 70’s Toyota trucks really sucked
  • Molly Ringwald and the Brat Pack
  • IBM Mainframe Assembler (yuk)

TinyMCE Javascript Content Editor

Wednesday, June 15th, 2005

TinyMCE Javascript Content Editor by Moxiecode Systems is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances. TinyMCE is very easy to integrate into other CMS systems.