Archive

Archive for February, 2009

sshfs

February 27th, 2009

I recently decided I was fed up with maintaining the files on my web host’s server via FTP. It is just a very unnatural and inconvenient way to update remote files – especially when making lots of small tweaks. What I really wanted was the normal file system abstraction. It seemed like mounting the remote file system as a folder in my local filesystem over SSH/SFTP would be ideal. Luckily, Miklos Szeredi (the author of FUSE) already did the hard work of implementing a little program called sshfs which does just that.

It was a piece of cake to install on my Linux box, and it looks like Mac’s have an implementation of FUSE available too. Once you have installed the tool you can mount a remote file system just like this:

format: sshfs username@host: folder_to_mount_in
example: sshfs dound@myhost.com: wwwdound

I now use sshfs to mount folders from a variety of remote machines on my local machine — it is much better-suited to many tasks than FTP, and for some tasks it beats SSH too. It is also handy when I want to grep remote files on a server I only have FTP access to. The only downside is that while you are in a terminal whose current working directory is within the remotely mounted directory all commands experience a slowdown – while I expected file-related commands like to run slower, I did not expect commands like clear to experience a noticeable latency. It is not clear to me whether this is an issue with sshfs, FUSE, or mounted file systems on Linux in general, but maybe I will look into it later. Regardless, I highly recommend sshfs — it is a very handy utility and much better than the alternatives.

David Underhill Linux, Software , , , , , ,

My first WordPress plugin: AJAX Login Widget++

February 22nd, 2009

Today I decided that did not really like the how WordPress handled user logins. Whenever you want to login, it whisks you away from what you were reading and onto a very empty login page. Once you have logged in, in tends to whisk you off somewhere new. Worse, when you logout it again takes you away from the page you were on to show you a blank login page. Thus I headed back to the WordPress plugins directory in search of something better.

What I found was a nifty plugin named AJAX Login which (surprise) used AJAX to handle almost all login processing within the page the user was on. Unfortunately, it had not been updated in over a year and was no longer compatible with the latest version of WordPress. Thus I started hacking on it and ended up making a number of improvements to its UI and how it handled AJAX calls. Anyway, I decided to package it up as a new plugin — you can get the plugin and read all the details about what it does here.

Its official location in the WordPress plugins directory is at http://wordpress.org/extend/plugins/ajax-login-widget/!

David Underhill Coding, WordPress , , ,

Something rather new

February 21st, 2009

Finally, a new look for an old website! As you might have noticed, I’ve jumped head first onto the WordPress bandwagon. It is actually a very nice content management system – I’m already a big fan of the plugin infrastructure. Less than a few hours into the plunge I already found myself hacking on the themes code, and later fixed a little bug in a plugin. The biggest disappointment is that the plugins directory does not provide official source repositories for the plugins. Update: I just found out you can find the source code to all hosted plugins at http://svn.wp-plugins.org/.

Anyway, I look forward to using this space to share some of the exciting things I learn. Hopefully others will respond with even better ideas.

David Underhill Other