Thursday, April 17, 2008

Actually... (aka Digital Recording II)

Assuming the background of this post, the amount of digital recording of other peoples' lives that I have through email, chats, journals, etc., is pretty amazing as well.

For anyone getting worried, save for the unfortunate of my untimely demise,* this is pretty much inaccessible to anyone but me. And even then it depends on my memory; my memory jogged by my own pictures, emails, chats, journals, writings (and blogs for that matter), etc.

Still, if you are one of the people that still read my blog, I probably have more of your life recorded than you realize. Of course, given how "digital I am," this goes two ways. Maybe more toward me than towards you (whoever you are, viz., my life has more digital recordings than most peoples'.)

*Untimely meaning before I am... old. In the most usual sense. E.g., before (or slightly before) I hit my expected lifespan. On the other hand, given the stunts that I have pulled I figure my expected lifespan is somewhere around 15, which I have obviously passed. Given that, I figure my new one is -- give or take -- 30.


Saturday, April 12, 2008

Stripping Down Filenames in Bash

I've seen these two questions asked multiple times and have both haunted me from time to time, so I thought I would provide some answers, although the second is rather rudimentary.

1. Stripping the path off of a file
How often have you needed only the filename, not the path that precedes it? Fortunately most Linux distros make it pretty easy to strip off with the basename command. E.g.,

user@host:~$ basename /etc/apache2/httpd.conf
httpd.conf


Note that if the path contains spaces you will need to enclose it in quotes or escape it:

#Escaping
user@host:~$ basename /home/madjon/youth\ room\ shots/local\ youth\ demographics.xls
local youth demographics.xls

#Quoting
user@host:~$ basename "/home/madjon/youth room shots/local youth demographics.xls"
local youth demographics.xls


2. Stripping the file extension
This takes some bash string manipulation which you can find all about at tldp. If we take httpd.conf again:

# First, assign the filename to a variable:
user@host:~$ f=/etc/apache2/httpd.conf
user@host:~$ echo $f
/etc/apache2/httpd.conf

#Next, strip out any string, starting from the end of $f that matches ".*"
user@host:~$ echo ${f%.*}
/etc/apache2/httpd


Note that the variable substitution (the curly brackets) doesn't have the $ inside it. E.g., the general syntax is:

VAR=whatever
echo ${VAR%.*}


If we want to put them together:

user@host:~$ f=/etc/apache2/httpd.conf
user@host:~$ f=`basename $f`
user@host:~$ echo $f
httpd.conf
user@host:~$ echo ${f%.*}
httpd


I'm sure that this could be accomplished easier with some regex and awk or sed, but all three of those are confusing to me; simple bash scripting makes much more sense to me. I hope this helps whomever.


Wednesday, April 9, 2008

The Digital Recording of My Life

Holy cow, it's late! I meant to be in bed nearly 45 minutes ago, but I had this post...

I've been working on a writing project for some time now, it was completely lost when my hard drive on my laptop died. Fortunately, the sources that I pulled most of it from (all my own original writing) still are around.

But I had to go and find these files again which have been scattered across several hard drives email, and multiple folders. What really struck me was that between the emails, my writing -- both homework and journals -- and blog entries, I have a pretty detailed record of my life, at least from the last 4-5 years. I may or may not be able to recover data further back than that, but it gets sparser at that point anyway.

It just is amazing how much of our lives are becoming self-recording without our even thinking about it...


Monday, April 7, 2008

Watching Bethel

I partially broke my system for completing time lapses, thus the break in them. At any rate, this is the most recent as of yesterday.

Also, I am hoping to actually start blog blogging again soon, at least at best as I can. I have at least one draft post on economics -- even if only one person reads it :-)


Friday, March 21, 2008

Reflective?

In the past year I've managed a mere 25 posts here. On my old blog I had 300 odd posts over three years. I'm not sure what happened to my writing. On the blog for my dad I just updated, 212 posts there, most of them written by me, most in a three and a half week span. Maybe that is why I am currently blogged out.

Actually I don't think that anybody visits this blog anymore, so it will be a surprise for somebody when they do again.

It was really weird to update the blog for my dad again. It starts bring back emotions really quickly, at some point I need to go back and re-read it. As I noted in the post mentioned, it is almost the only remaining evidence that anything ever happened. My dad is up and running normally enough, I am the only one that is still catching up on work from last fall. I guess that blog -- both literally and symbolically -- represents what has probably been the most singularly important event in my life.


Monday, March 10, 2008

Watching Bethel

Latest time lapse of the new BU Commons, rendered this morning.






Sunday, March 9, 2008

Gmail/SSL

FYI: This is only for the geeky, not for anyone that generally follows this blog (if anybody still does).

On a mailing list that I subscribe to there was some talk as to whether Gmail will keep all traffic encrypted or not. Considering that I use Gmail, this was of some importance to me. So I used a packet sniffer (Wireshark) to monitor Gmail for a few hours.

After going through the Wireshark log (which took a bit!) the only non-SSL/TLS traffic from Gmail I could find looked like this:


ET /safebrowsing/update?client
=navclient-auto-ffox&appver=2.0.0.11&version=goog-white-domain:1:30,goog-white-url:1:371,goog-black-url:1:19069,goog-black-enchash:1:46040
HTTP/1.1
Host: sb.google.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11)
Gecko/20071204 Ubuntu/7.10 (gutsy) Firefox/2.0.0.11
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: PREF=ID=2ebc725f67fb2226:TM=1185368577:LM=1204091083:FV=2:GM=1:S=wxIX6A2MoEz-E_jQ;
NID=7=idUEA3RlV2HdMJnwhlss9BlI_xHRanyp-YhurpGmW2VRTJRbQtFLMGUCaA4DM2EbxvWUdUmDM4QocyqrcNaAzeezJah8ZVR025-cv7ZI1pmmQFGztHdIOpBmOrAHmnnb;
rememberme=true; TZ=360; GMAIL_RTT=199;
SID=DQAAAHkAAADzxZbZSOLdabfqK8Sg1BqQiOfOHP_vmkzA86-1aZ6g6qK4ny6F2kgvPQk2w2L6NXGwI7d6eN7TC1ZT2otnoPuen1GljghnYC6w9F6o56AB1UB_LIaHO1CfI5VgfDr_JTUBy29vzneXPb6EbemlUPJ8tq0p_Kp6ysh90MNmjupnRw

HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Cache-Control: public,max-age=600
Server: TrustRank Frontend
Content-Length: 40363
Date: Fri, 07 Mar 2008 19:48:54 GMT

[goog-black-enchash 1.46041 update]
-181A72096A3A5F5A6B5CE3D22D4990DC
+1ADDDA4E33D074B417D9032C0074E54B.Z1YySDViZ1cwW70PPccj6T76+VSLmilYHD4snvGWoJZDwmAzbDdxaDCGZQsJiCtQadFG7eZ2X6DeDa1bmIm2rUV+UkvCzR7eyfQ+raZEmhGeN+mJMsQnhgwogxfy
+32B06F940FF6E48A2FE609B51E416C58.ckkydGZxM2uxa3j+ksQIJoP044ACSApNlQwR1Hx3orZ+53tHaJmUOAxHjOP9ApeQzZjxW/2iepjX+SVeDnkMLSu6at81oCpjXI8cfBkYg1ntKazdBBraDzoh31YCI5mgLgj2iybtFg==
-409CA5195CFE1F8B615C0CF72343DE19


Except that the whole thing was ~41kb.

So, while not an exhaustive study by any means, it *does* look like Gmail will stick to SSL, or some type of encryption (I have no idea what "goog-blacl-enchash" means, but it certainly isn't plaintext).

If anyone wants to look through the packet dump let me know, it's about 4mb uncompressed after I filtered out traffic that I knew wasn't from Google (from a cron job I have going), I'd be glad to post it somewhere.