Random Student Generator

I recently needed a method for choosing a student at random from my classroom roster. To add an element of interest, I wanted the computer to speak the name out loud. I came up with a simple shell script I called "sayline" which will work on Mac OS X or Linux. Mac users, you would run this from the "Terminal" app. Linux users, you know what to do.

SSH login without Password

If you regularly ssh and scp between *nix-based machines (Mac OS X/Linux), this will save you the time and effort of entering your passord every time. Let's say you want to ssh from host "A" to host "B". Here's how you set it up.

First log into host A and generate a pair of authentication keys. Note that this step only has to be performed ONLY ONCE on the host you want to SSH from, and you can copy the public key to any number of remote hosts. Do not enter a passphrase at the prompt (leave blank).

CD/DVD Sharing on Mac OS X

In the Macintosh world, when you want to do something, it's supposed to "just work". Which is why I had trouble enabling CD/DVD sharing in the control panel until I found this hint at macosxhints.com. Simply enter the following terminal commands, and relaunch the Finder.

$ defaults write com.apple.NetworkBrowser EnableODiskBrowsing -bool true
$ defaults write com.apple.NetworkBrowser ODSSupported -bool true

svn propset svn:externals

Every so often when I have to set an external reference to a remote repository, it takes me a number of tries to get the syntax right, and I often stumble over the ubiquitous "svn: warning: Error handling externals definition". Here is the proper procedure and syntax.

First change to the directory where you want to create the external reference. For example, I'm using an external module called "ion_auth", and I want to put it into the "ion_auth" subdirectory.

DO NOT create the ion_auth sub-directory prior to issuing the following command:

Gnome Login Crankiness

My Linux media server currently runs Ubuntu Version 9.1 (Karmic Koala). At one point I started experiencing a problem whereby I couldn't login at the Gnome screen. After typing my password, it displayed the Ubuntu splash screen, then after a few seconds, switched back to the login screen.

Since I could login as a different user, I realized the cause must be some corrupt gnome file under the user directory, but there are so many, I wasn't sure where to start. After googling around, I came across this simple solution which fixed everything.

MySQL 5 on Mac OS 10.4/PowerPC

Although my primary development machine is an Intel-based Mac, I still use my venerable PowerBook when working at home, on the road, and so on. I still run Mac OS 10.4 (Tiger) on it, but upgraded to Apache 2 and MySQL 5. The latest pre-built version of MySQL which supports this configuration is 5.0.67. I encountered a couple of problems after the upgrade process which deserve attention.

Upgrade Script

Automount Linux NFS Shares in Mac OS X

NFS is a legacy file sharing protocol which continues to have wide support in the Linux world. Depending on your needs, there may be better alternatives to using NFS network shares. However, if you're a Mac user in the context of a mixed network environment and your Linux administrator doesn't want to support Apple's File sharing Protocol, then this solution may be for you. Included are instructions on configuring NFS shares on the server side for Linux noobs like myself.

NFS Server

Better Renaming through Perl

I come across a million postings about the best way to rename multiple files at once from the command line. Of course there are nearly as many solutions. Sure, it's possible (and sometimes desirable) to write a shell script using a combination of sed, awk, mv, and so on. But the solution I've found most useful and flexible for everyday file operations is a Perl script by Larry Wall and available at the CPAN repository

Download & Install

Subversion and CodeIgniter

Subversion is a robust, open source version control system for software development. CodeIgniter is a powerful but lean Object Oriented PHP-based web development framework which utilizes the Model-View-Controller approach.

For quite a while, I used CVS for my revision control, but recently migrated to Subversion due to it's superior capabilities. If you're developing multiple CodeIgniter web sites which share system code and you're looking into implementing a revision control system. Here are some guidelines.

Setting up an SVN Server

Ubuntu/Linux as a Time Machine Server - Updated for 16.04

Since my household is primarily Mac based, I wanted to setup my Ubuntu server as an AFP/Time Machine backup server for the LAN. Not surprisingly, this proved possible, but not trivial. First I'll provide a summary of the necessary steps, then detailed instructions for the terminal savvy folks.

On the Linux Side

  1. Download, build, install & configure netatalk (AppleTalk & AFP services)
  2. Configure the afp daemon
  3. Setup your AFP shares
  4. Install and Configure Avahi (Bonjour service advertising)

On the Mac Side

Pages

Subscribe to The Other Wax Drum RSS