Archive for the ‘Personal’ Category

Well I’m Back


14 Jan

After a week (plus 2 days) vacation I’m back in thw swing of things… At least until the 20th when I take off to meet up with the gang once more.  I’ll be glad when all this traveling is done… I’m something of a simple homebody and this shuffling from one place to another makes me itchy :)

The vacation was OK. It rained almost constantly, was cold. The drive up was the worst, it just happened to coincide with a huge storm, and we could hardly see the road as we drove through the mountains (thank God for GPS.) There was no fence so we had to stand out in the rain to let the dogs do their business. The shops were alright, a lot of them closed for THEIR vacations (being the tourist off season.) Before we left the window in the kitchen sprung a leak just in time for a huge rainstorm. Bella went into heat (again) and had to wear a diaper the whole time. The dogs didn’t behave well (dogs neverdo when cooped up for a week solid (on top of the hormone cocktail of bella going into heat.))  We did get about 3/4 of a day on the beach in the sun towards the end.

We’ll get bella fixed as soon as shes out of heat. We would have done so earlier but for various medical complications (eye surgery, then heat, then the new cat brought ringworm to the home with it, and now heat again.)  Dont worry, we’re not planning on having our own puppies.  Not at this juncture in our lives anyway.

All said, I was relieved to finally get home where things made sense, and even if bad things were to continue plaguing us  we could deal with it in the known comforts of our own home.

happy er… holidays…


27 Nov







Public Service Announcement


22 Sep

If you live and work by your phone

And you have indoor pets

Do not, under any circumstances, place your phone near and above a large glass of water.

We now return you to your regularly scheduled internet

And we’re off


30 Jun

So now back off to the vet to pick up the dog who’s gonna spend most of the next few weeks being MISERABLE because he’s gonna have to be crated a a LOT, wont be able to play with the other dogs at all for a while, and will have to wear a satellite-dish-collar. On the plus side he’ll have a drain installed in his ear and he’ll be leaking gross fluids form his head for a while. I guess theres ALWAYS a silver lining, insn’t there?!

quick update


30 Jun

Well… everything that could go wrong this weekend (outside work) has gone wrong.

My replay tv is dying

My wifes laptop is dying

I have one dog getting out of surgery right now because of a hematoma

I have one cat with ringworm

One cat got the crap beat up out of her in a fight

I had my tire punctured so badly it needs replacing (this was on the way to the vet yesterday night when we noticed the swelling in buddy’s ear (the hematoma))

The dogs chewed a hose

One dog ate my wifes flipflops while we were away and puked pieces of it up all over the house

We have to go back to Fremont sometime this week to return the old cable receiver and modem or get sent to collections

Oh, and the IRS sent us a letter about a form missing from my tax return (I used TaxCut to avoid exactly this kind of crap!)

On the plus side… We’re alive :)

Off to the vets office


13 Jun

Actually it’s an eye specialist. My poor Bella’s eye (which has a detached lens and possibly glochoma (sp?)) has really been acting up the last several days. Wish her (and my wallet) luck!

When simple plans attack!


09 Jun

Well at the zoo we lost a pair of glasses, so off to lensecrafters… no eye exam in 3 years… so eye exam… 2 hors for glasses… and WHAM a day thats supposed to end at 4:00pm ends at 9:00pm… sigh… :) we now return you to your regularly scheduled blogging.

nasty regex


05 Jun

I’m putting this here for documentation purposes… Because getting it right was a very frustrating ordeal (I’d never had to match both positively and negatively in the same regex before)

/^(?(?!.+\.php)^.*(\.jpg|\.jpeg|\.gif|\.ico|\.png)|^$)/s

what this is, essentially, saying is “true if the string doesnt match ^.+\.php and the string matches ^.*(\.jpg|\.jpeg|\.gif|\.ico|\.png)” The last bit: “|^$” never returns true in my case,because we’re matching on URI’s which are always at least one character long ( “/” )

All things being equal, the simplest solution tends to be the best one.


30 May

Occam’s razor strikes again!

Tonight we ran into an interesting problem. A web service – with a very simple time-elapsed check – started reporting negatives… Racking our brain, pouring over the code, produced nothing. It was as if the clock were jumping around randomly! No! On a whim Barry checked it and the clock was, indeed, jumping around…

# while [ 1 ]; do date; sleep 1; done
Wed May 30 04:37:52 UTC 2007
Wed May 30 04:37:53 UTC 2007
Wed May 30 04:37:54 UTC 2007
Wed May 30 04:37:55 UTC 2007
Wed May 30 04:37:56 UTC 2007
Wed May 30 04:37:57 UTC 2007
Wed May 30 04:37:58 UTC 2007
Wed May 30 04:37:59 UTC 2007
Wed May 30 04:38:00 UTC 2007
Wed May 30 04:38:01 UTC 2007
Wed May 30 04:38:02 UTC 2007
Wed May 30 04:38:19 UTC 2007
Wed May 30 04:38:21 UTC 2007
Wed May 30 04:38:22 UTC 2007
Wed May 30 04:38:23 UTC 2007
Wed May 30 04:38:24 UTC 2007
Wed May 30 04:38:08 UTC 2007
Wed May 30 04:38:09 UTC 2007
Wed May 30 04:38:10 UTC 2007
Wed May 30 04:38:28 UTC 2007
Wed May 30 04:38:12 UTC 2007
Wed May 30 04:38:30 UTC 2007
Wed May 30 04:38:31 UTC 2007
Wed May 30 04:38:32 UTC 2007
Wed May 30 04:38:33 UTC 2007
Wed May 30 04:38:34 UTC 2007
Wed May 30 04:38:35 UTC 2007
Wed May 30 04:38:19 UTC 2007
Wed May 30 04:38:20 UTC 2007
Wed May 30 04:38:21 UTC 2007
Wed May 30 04:38:22 UTC 2007
Wed May 30 04:38:40 UTC 2007
Wed May 30 04:38:41 UTC 2007
Wed May 30 04:38:42 UTC 2007
Wed May 30 04:38:43 UTC 2007
Wed May 30 04:38:44 UTC 2007

PHP CLI Status Indicator


21 May

Most times when people write command line scripts they just let the output flow down the screen as a status indicator, or just figure “it’s done when it’s done” But sometimes it would be nice to have a simple clean status indicator, allowing you to monitor progress and gauge time-to-completion. This is actually very easy to accomplish. Simply use \r instead of \r\n in your output. Obviously the example below is very simplified, and this can be applied in a much more sophisticated fashion. But it works.

<font style="color: darkred">$row_count = get_total_rows_for_processing();</font>
$limit=10000;
<font style="color: darkred">echo "&#92;r&#92;n[  0%]";</font>
for ( $i=0; $i &lt; = $row_count; $i = $i + $limit ) {
  $query="SELECT * FROM table LIMIT {$limit} OFFSET {$i}";
  // do whatever
  <font style="color: darkred">$pct = round((($i+$offset)/$row_count)*100);
  if ( $pct &lt; 10 ) {
    echo "&#92;r[  $pct%]";
  } else {
    if ( $pct &lt; 100 ) {
      echo "&#92;r[ $pct%]";
    } else {
      echo "&#92;r[$pct%]";
    }
  }</font>
}
<font style="color: darkred">echo "&#92;r[100%]&#92;r&#92;n";</font>

CodeWord: Apokalyptik

The random things that spew forth from my brain…