Seeking organization

Since about January I've been moving between several methods of keeping track of everything I need to do. First I tried Google Tasks (through Gmail) but found it was difficult to remember to use it, though it was easy to add/edit task while away from my desk. Next I tried a more basic approach, use Tomboy Notes on Ubuntu, which stores and syncs your notes as well as supporting cross-references within notes. I held onto this for about a month, and I ended up with a decent body of information spread across many notes.

The solution I settled on recently has been much simpler than all that. I noticed in my notes (and previously tasks) that they were bunched into several categories (e.g. Work, Health, Hobbies, etc), and while I could group the notes into folders, but further than that I had my work notes in a separate lab notebook file, and all my fitness data in a physical notebook (that had been replaced a few times due to loss). I decided to use a single file and journal each day, with areas broken down as paragraphs. The only thing that makes this useful though is having specific information presented always with consistent formatting, making regular expressions an easy way to scrape data from it.

As each day starts with how much I slept, and ends with a few data regarding food intake and such, it's trivially easy to parse any given set of days into graphical format.

Parsed nutrition data. Note the so-called "Calzone Peak".
Parsed nutrition data. Note the so-called "Calzone Peak". I know that  I'm under my required calories; it's only for the short term. 
Parsed sleep data, with obvious jetlag.
Parsed sleep data, with obvious jetlag.

While the system isn't perfect, it does make it easier to review my days and orient myself on a local time line. This is especially valuable when work seems to make all the days blur together save for the weekend. I've noticed even just re-reading the entry for a single day before bed reminds me how long a day actually is.

I'll likely have to split each month into its own file to prevent compilation time from growing too long, but tweaking the code to parse multiple tex files is easy enough. I'll stick with this system until something else comes along, and post updates if it continues to prove useful. If anyone would like the scraping code, just ask in the comments; though writing it is good regex practice.

How do I get home? Reliably getting the external IP in python

I recently had some help setting up an IP camera in my apartment from some friends and we collectively discovered that DynDNS's static IP service was no longer free. As a cheap student, that was terrible news. Once everything was set up (some port forwarding and a free version install of VitaminD) I went ahead and got down to writing up a barebones python script that would make sure I never lost track of the camera while away. The first step was figuring out what my external IP was at any time, which proved to be a little more roundabout than I'd hoped. Services like whatismyip.org tend to either reject bots or present the result as an image, ostensibly because they don't want to become an API for the exact task I had in mind. It hit me that I have a remote host that can identify a client, this site. So I whipped up a very simple one-line PHP file:

<?PHP print $_SERVER['REMOTE_ADDR'] ; ?>

I tossed this on my server and had python grab it. Sure enough, it contained exactly my external IP address. The next step was to get that information back out to myself. I would say this is where it gets hackity, but I'm 90% sure there's a much better way to do the above as well. I had python build an html file with a redirect and push it up via FTP. The code then checks the external IP once an hour, if it changes it updates the redirect page. I'll stop shy of pointing out where I've stored the files, but the camera itself is password protected.

This was a very short term fix, as I've got a trip in the very near future