Saturday, May 22, 2010

Another Excellent Use of Dropbox

Dropbox is my new favorite utility.  When I first heard of it, I thought I'd never use it.  Then, after darn near pulling out my hair trying to figure out why my VOIP PBX server keeps freezing up, I wrote my last blog post (like 5 minutes ago!) which copies the uptime file to Dropbox.

Then, I thought that the second biggest pain in the rear is messing with copying files between the computers for the phone configurations.  I have great tools on my Mac (like TextWrangler, which for XML-style phone configuration files is awesome), and... well, I have vim on the VOIP PBX server.

I don't want to mess around with reconfiguring the tftp server (for the phones), so I simply went to ~/Dropbox:
$cd ~/Dropbox

...and linked it to /tftproot, which is the tftp (trivial file transfer protocol) root folder which is returned to the individual phones:
$ln -s /tftproot/

This created a folder link in my Dropbox folder which sent the contents to Dropbox.  Now, with it in Dropbox, I can edit the files on my Mac and Dropbox will handle the transfer.

Using Cron and Dropbox to monitor a server

I've been dealing with a server that has an issue, and I keep trying to get things to work right.  I thought it might be nice to know (without having to check and potentially without being at home) if the server is operating correctly by copying the runtime file (which tells how long the server was running).

So, the first thing I've done was open a Dropbox account and install Dropbox CLI.  This, by default, sets the folder to ~/Dropbox on Linux.

Then, I created a cron job to copy the runtime file every five minutes:
$crontab -e

In vim, which is the default editor in CentOS (and probably many others), you'll need to press 'i' to get into insert mode.  Use the following in the crontab file:
5,10,15,20,25,30,35,40,45,50,55,0     *     *     *     *     cp -f /proc/uptime ~/Dropbox >/dev/null 2>&1

Then, in vim, press esc, ':', and 'wq' and press enter.

Now, every 5 minutes the runtime file will be copied to the Dropbox folder and synced to Dropbox.  Even better, this can be extended to include reports (perhaps those generated by Nagios or another monitor program).

Monday, May 17, 2010

What have I done that is so great?

Steve Jobs (to a Gawker Blogger): "By the way, what have you done that's so great?  Do you create anything, or just criticize others work and belittle their motivations"

Interesting quote.  Arrogant, flamboyant, and in some ways, mean.

I guess the same question can be asked of me, since I've been pretty critical of a lot of others (Microsoft, Apple, Google, The American Planning Association, to name a few).  Well, I have my answer:

  • I've built the first part of an activity generator, which is part of a new generation of travel demand models (all on a PC).  The code from this will be shared to others in the state I live in.

  • I've assisted many relatives and friends with computer issues.

  • I've freely shared my knowledge on several listservs and user support web sites.

  • I've built a VOIP phone system in my house.

  • I created the theme you see on this website.  In fact, I've built this website and worked on several others.


For still being young, I'd say I've one pretty well.

Saturday, May 15, 2010

Why Google's Not Wrong in Sniffing Wi-Fi Data

Google admitted to sniffing wi-fi data with their streetview cars.  The NYT thinks "Google could be accused of intercepting private communications and violating wiretap laws in the United States".  The flaw with the thought lies in the same article: "nonpassword (sic) protected Wi-Fi networks".

The flaw with the thought of Google violating wiretap laws is that they didn't break into a closed network.  The telephone network is closed (physically).  A wired computer network is closed.  A password protected wi-fi network is closed.  An open wi-fi network is NOT.  This is akin to Google walking down the street with a recorder listening to everyone SHOUTING.

The moral of this is to lock down your wireless network.  The really scary thing for those affected is that even a light-weight hacker could do all kinds of damage to a computer on an open wi-fi network.  In fact, most could do a few things that could be criminally damaging and put someone in jail for years..  The manufacturers of most of the wireless access point or wireless router devices have done a darn good job of making it easy to set encryption on their devices.  The last three I've had any experience with (all from different manufacturers, Apple, Linksys, and Netgear) have idiot-proof instructions.