So long whip

whip.bikegeeks.org, our venerable server is being was shut down at 9:11pm last night.  Pour some beer on the floor.

[root@whip etc]#
Broadcast message from root (pts/4) (Thu Jan 29 21:11:05 2009):

The system is going down for system halt NOW!
Connection to whip.bikegeeks.org closed by remote host.
Connection to whip.bikegeeks.org closed.
[tod@fidel ~]$
 

Temporarily enable password-based ssh login

When we set up whip, our old workhorse server, a couple years ago, we disabled password based ssh logins, choosing to only allow access via public keys.  However, I occasionally needed the ability to access the system when I didn't have ready access to my private key (like when using someone else's / a public computer).  I came up with a system that would enable password-based ssh login for a period of time and then re-disable it.  This post describes that technique.  The system was actuated by a button an internal (private) web page (as described below.  On the same page, had a link to the MindTerm applet, also installed on the server.  This applet, which provides a terminal-like canvas with an ssh session, allowed me to access the server with only a java-enabled browser.

The system was run by a button press on a page.  The page was only accessible via a simple-auth challange (page served over SSL) to prevent shenanigans.  The button called a .cgi script that would, in turn, run, via sudo, anotheand r script that updated the sshd config (allowing password-based logins) and then restarted the sshd service.  This script also forked, the fork sleeping a set amount of time before restoring the original sshd config and (again) restarting sshd.  Note: all paths in these scripts (and related content) are specified with full paths for security.  (Additionally, everything is chmodded as unwritable.) It goes without saying that these paths were particular to the setup on whip...

CSS by Page

One thing I've often wished for is the ability to insert user-written CSS into a page or set of pages on a Drupal site.

It would: 

Migrating Gallery to Dreamhost (migrate PostgreSQL -> MySQL)

One of the last things to migrate to Dream Host is my collection of Gallery2 installations.

The biggest issue is a database disparity. On whip (my old server) my gallery2 installs were done using the multisite installation scheme on a PostgreSQL database. DreamHost supports only MySQL and gallery doesn't have an import/export function. So, I had two options: reimport the albums into fresh gallery2 installs or migrate the installations along with the data. I didn't want to loose all that meta-data so I gave migration a shot. These notes are being typed after doing the process a 2nd time. Learn from my mistakes!

Creating favicon.ico with the GIMP

I liked this guy's answer a lot -- doesn't mess around w/ command line stuff and allows the creation of transparent favicons.

From: http://www.techanswerguy.com/2007/03/creating-transparent-faviconico-wit...

creating a transparent favicon.ico with Gimp
I'm always forgetting the steps to do this properly. Here you go:
1) open a favorite image that you'd like to turn into a favicon to appear in your browser's location bar
2) click Image->Mode->RGB
3) using the erase tool, erase any areas of the graphic that you'd like to be transparent

Tethering my centro cellphone to my linux laptop

I needed to figure out how to tether my (Sprint) Centro to my laptop.  ("Tethering" being the cool way to say use the phone to provide network connectivity.)

After looking around, specifically at this page, I purchased the Mobile Stream USB Modem software.  (I use their Card Reader software already and it works great.)  I followed the directions on the ubuntu tutorials site and was able to get network connectivity right away.

Of course, I had to do a few more things (get name service set up, etc.)  Being the script compulsive person I am, I wrote the script below (also attached as file) to facilitate this system.  Now all I gotta' do is get connection sharing working and I'll be golden.

Before the script tho, some other links:
           June Fabrics 'PdaNet' software, according to reports on the 'net, works well; but is Winders only, so a no-go.
           A page on getting DUN working w/ bluetooth on the Mac.  Has some interesting words about getting a Vision password.  I found it wasn't necessary as did the person who wrote the Ubuntu tutorial.

encfs over sshfs to DreamHost backup account

How to set up a encfs over sshfs
(using DreamHost backup space; but discussion is the same)

I wanted to combine the power of sshfs with the security of encfs to backup my personal files on DreamHost's allocated 50G of file backup space. I liked the idea of having my personal files a) backed up and b) on the Internet available for use from work.

Setting up the mount of the remote (DH backup space) directory on a local dir using sshfs:

I created a local mount point 'dreambackup' and issued the command:

.htaccess rewrite

Check this blog post about Apache mod_rewrite rules:

http://corz.org/serv/tricks/htaccess2.php

The post gives many rewrite rule examples that solve real-life problems.

Theme sites

Found this site with cool, free site templates offered
http://www.ramblingsoul.com/
 
Another:
http://themebot.com/website-templates/drupal-themes

Syndicate content