This is a simple Python script that detects changes in your internet connection status opening an HTTP connection to a specified URL. Changes can then be published automatically to Twitter and as a direct message to a Twitter user.
Note that this requires python-twitter to be able to publish to Twitter from Python.