Update Sitelutions With Router’s IP Script
December 3, 2005
Here is a python script I wrote that will update http://sitelutions.com/ with your Linksys BEFSR41 router’s IP address. The code will work with the Linksys WRT54GS router as well. But you will need to uncomment and comment code. It shouldn’t be too difficult to figure out where.
If someone would like to write the python code to daemonize this script, please do. Currently, I have it in my cron.daily.
Oh yeah, the script will not update sitelutions unless the router’s ip address is different than your domain name (yourdomain.com). I know that DynDNS requires users to update their dynamic ip address (regardless of whether it has not changed) every 30 days for their account to remain active. If sitelutions requries the same, please let me know so that I can add an option to the script. If they do, the script will never inform sitelutions that your IP has stayed the same and your account will expire.
The script: Update Sitelutions With Router’s IP
The script requires the Beautiful Soup package: Beautiful Soup
screen irssi load script
December 3, 2005
This is a very useful script I wrote to load and run irssi in screen. I aliased it in .bash_profile to "irc". So, now I just run "irc" and if irssi has not been placed in screen already it will run irssi in screen; otherwise, it will attach irssi to the irc screen session. It makes running irc with screen superduper fast.
#!/bin/bash
# Run/Load IRC Script
# This script runs irssi in screen if it has not already been done.
# If irssi in screen is already running, it will then attach to
# the irc screen session for you.
if screen -ls | egrep '^[[:space:]]+[^[:space:]]' | awk '{print $1}' | egrep '.irc$'
then # running
screen -x irc
else # not running
screen -c ~/.screenrc.irc -S irc -t irssi irssi
fi
And here is .screenrc.irc
# detach on hangup
autodetach on
# multiusers
multiuser on
# no copyright notice during startup
startup_message off
# remove some bad bindings
bind k #kill
bind ^k #kill
bind . # dump termcap
bind ^h # hardcopy
bind h # hardcopy
bind A # title (clashes with vim's increment)
Something also useful: /bind meta-home scroll_start and /bind meta-end scroll_end (to scroll buffer to beginning and end with alt+home and alt+end, respectively).