Archive for September, 2007

OpenVPN

Well in my drug-induced down time I’ve been fiddling with my Gentoo server some more… I added Wake-on-Lan support to the kernel so that I can power the system up from upstairs or across the country. It’s nice because I don’t tend to leave it on all the time and even when I’m home, it’s a pain to hit the power button since I keep the system squirreled away in a cabinet.

In addition however, I also added OpenVPN support to the server. I punched a hole in the firewall and set up Ethernet bridging in order to give me full access to the entire network when I’m away from home. It works amazingly well. It wasn’t quick to set up but it was kind of fun. Basically you create an Ethernet bridge between a “real” network adapter and the virtual OpenVPN adapter and assign that bridge the IP address of the old “real” network adapter. I like.

3 Comments »

Andrew Flanagan on September 27th 2007 in Actual Events, Geekiness

More Bash Scripts

I need to copy all of my FLAC files out of my directory tree but preserve the folder structure that they were in… Here’s my script.

Unfortunately, it’s not a “perfect” solution as there are issues when handling special characters in files (especially newline characters). However, since my file really just have spaces in them, that’s all this was designed to beat.

SOURCEDIR="/var/mirror/Data/Audio/My CD Archive"
TARGETDIR="/var/mirror/FLAC"
 
mkdir "$TARGETDIR"
 
find "$SOURCEDIR" -type d | while read DIR; do
  if [[ "$DIR" != "$SOURCEDIR" ]]; then
    SHORTDIR=`echo $DIR | sed 's/.*///g'`
    mkdir "$TARGETDIR/$SHORTDIR"
    echo "Now in $DIR"
    find "$DIR" -name "*.flac" | while read FILE; do
      SHORTFILE=`echo $FILE | sed 's/.*///g'`
      echo "Now moving $SHORTFILE"
      mv "$FILE" "$TARGETDIR/$SHORTDIR"
    done
    echo "--------------------"
    sleep 1
  fi
done

1 Comment »

Andrew Flanagan on September 25th 2007 in Actual Events, Geekiness

Done? Good, now start again.

That’s how I feel these days. There’s always been “overhead” stuff that I have to do. You have to take showers and dress and clean up after yourself (at least somewhat). You have to spend time getting ready for work and driving to work and reading emails and just doing all the boring monotonous things that no one enjoys but are required.

Well, I’ve now hit the point where about the time I’m wrapping up all the “overhead” tasks and ready to do something useful I realize I’m out of time. More “overhead” tasks crowd in around me and it’s time to brush my teeth and get to bed early so I can wake up early and repeat.

It’s terrible.

Granted, I have time to write this blog entry. But you know what? I’ve sadly actually tried to allocate “overhead” time to write to my blog! I guess I feel as if it’s a journal in many ways and so writing in it is part of this complete healthy life.

But this makes me think: maybe it’s not that I get nothing but overhead done but rather that I’ve put far too many tasks into the “overhead” category merely because they repeat frequently. Nowadays, virtually everything I do is scheduled. I schedule my oil changes, how many times we vacuum the house, every odd job and maintenance task is updated on my calendar if I can think of it. My daily status report for work is scheduled (and I receive a horrible email warning me about it every day). If Sarah and I want to have fun, we generally schedule some event weeks in advance and I shuffle some of the chores off of that day in the calendar and reallocate them to make a little extra room.

So maybe it’s not about overhead, maybe it’s about spontaneity and the realization that precious little can be done on the spur of the moment anymore.

I hate routine. Maybe I should write a program that takes my tasks and in an intelligent way re-arranges them to surprise me without totally destroying any sense of order.

Hmm… that sounds like a program that would probably have to pass the Turing test. I think what I’ll do is make an entry in my calendar to write this program. Maybe next Tuesday. That sounds good.

7 Comments »

Andrew Flanagan on September 14th 2007 in Actual Events, Ranting & Ravings

Fun with Javascript

1. Browse to a site like Amazon.

2. Enter the following into your browser address window

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin (R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);

3. Hit Enter and watch the weirdness.

4 Comments »

Andrew Flanagan on September 13th 2007 in Geekiness

Investments

So… it’s been a bad quarter for the markets. However, my emerging markets fund has still been performing relatively well. What does this mean from a market perspective? With so much supposed instability in Asian markets I would have thought that it would take a larger hit… However, here’s what I have:

Emerging Market Fund (USEMX)- QTD: 3.36% YTD: 20.43% Last 12 months: 41.87%

Cornerstone Strategy Fund (USCRX) - QTD: -0.96% YTD: 4.84% Last 12 months: 12.73%

Small Cap Stock Fund (USCAX) - QTD: -4.13% YTD: 5.49% Last 12 months: (not enough data)

I need to get into this more so that I can attempt to make good decisions (or at least feel snotty when I tell people why I’m making decisions). I don’t believe in “beating” the market, but if I can invest in such a way that I can hedge losses that may affect me in other areas I’d be interested. For example, if I’m concerned about massive outsourcing by U.S. high-tech companies (which will affect the entire industry, including my potential earnings) then where should I invest to balance this loss? That sort of thing.

3 Comments »

Andrew Flanagan on September 6th 2007 in Actual Events

Your Assignment:

Just count the black dots:

count.jpg

3 Comments »

Andrew Flanagan on September 5th 2007 in Somewhat Random