Roku Giveaway over at My Charmed Life

Posted on June 11th, 2009 by dandavis
No Tags

Sarah over at My Charmed Life if giving away a Roku. I've wanted one for a while, so I hope to win this giveaway myself… :)

For details of the giveaway, see this post: Roku Digital Video Player Review & Giveaway.

The Truth About Working in the IT Industry

Posted on February 8th, 2009 by dandavis
No Tags

I found this while stumblin' the interwebs…

  1. We work weird (night) shifts…

    Just like prostitutes.

  2. They pay you to make the client happy…

    Just like prostitutes.

  3. The client pays a lot of money, but your employer keeps almost every penny…

    Just like prostitutes.

  4. You are rewarded for fulfilling the client's dreams…

    Just like prostitutes.

  5. Your friends fall apart and you end up hanging out with people in the same profession as you…

    Just like prostitutes.

  6. When you have to meet the client you always have to be perfectly groomed…

    Just like prostitutes.

  7. But when you go back home it seems like you are coming back from hell…

    Just like prostitutes.

  8. The client always wants to pay less but expects incredible things from you…

    Just like prostitutes.

  9. When people ask you about your job, you have difficulties to explain it…

    Just like prostitutes.

  10. Everyday when you wake up, you say: "I'm not going to spend the rest of my life doing this."

    Just like prostitutes……..

Check me out on eHow!

Posted on January 26th, 2009 by dandavis
No Tags

Published my first eHow article today: How to make Sweet Potato Rolls. My profile.

Bar Stool Economics

Posted on November 5th, 2008 by dandavis
Tags:

I stumbled upon this recently and thought it was worth reposting…

Suppose that every day, ten men go out for beer and the bill for all ten comes to $100. If they paid their bill the way we pay our taxes, it would go something like this:

The first four men (the poorest) would pay nothing.
The fifth would pay $1.
The sixth would pay $3.
The seventh would pay $7.
The eighth would pay $12.
The ninth would pay $18.
The tenth man (the richest) would pay $59.

So, that's what they decided to do. The ten men drank in the bar every day and seemed quite happy with the arrangement, until one day, the owner threw them a curve.

"Since you are all such good customers", he said, "I'm going to reduce the cost of your daily beer by $20". Drinks for the ten now cost just $80.

The group still wanted to pay their bill the way we pay our taxes so the first four men were unaffected. They would still drink for free. But what about the other six men - the paying customers? How could they divide the $20 windfall so that everyone would get his "fair share?"

They realized that $20 divided by six is $3.33. But if they subtracted that from everybody's share, then the fifth man and the sixth man would each end up being paid to drink his beer. So, the bar owner suggested that it would be fair to reduce each man's bill by roughly the same amount, and he proceeded to work out the amounts each should pay.

And so:
The fifth man, like the first four, now paid nothing (100% savings).
The sixth now paid $2 instead of $3 (33%savings).
The seventh now pay $5 instead of $7 (28%savings).
The eighth now paid $9 instead of $12 (25% savings).
The ninth now paid $14 instead of $18 (22% savings).
The tenth now paid $49 instead of $59 (16% savings).

Each of the six was better off than before. And the first four continued to drink for free. But once outside the restaurant, the men began to compare their savings.

"I only got a dollar out of the $20," declared the sixth man. He pointed to the tenth man, "but he got $10!"

"Yeah, that's right," exclaimed the fifth man. "I only saved a dollar, too. It's unfair that he got ten times more than I!"

"That's true!!" shouted the seventh man. "Why should he get $10 back when I got only two? The wealthy get all the breaks!"

"Wait a minute," yelled the first four men in unison. "We didn't get anything at all. The system exploits the poor!"

The nine men surrounded the tenth and beat him up.

The next night the tenth man didn't show up for drinks, so the nine sat down and had beers without him. But when it came time to pay the bill, they discovered something important. They didn't have enough money between all of them for even half of the bill!

And that, boys and girls, journalists and college professors, is how our tax system works. The people who pay the highest taxes get the most benefit from a tax reduction. Tax them too much, attack them for being wealthy, and they just may not show up anymore. In fact, they might start drinking overseas where the atmosphere is somewhat friendlier.

-Author Unknown

Snopes page about this…

It Is Dan O'Clock

Posted on October 7th, 2008 by dandavis
Tags:

"We are on Eastern Pain Time, and it is Dan O'Clock." — Dan McNinja

My Debt Reduction Post

Posted on October 3rd, 2008 by dandavis
Tags:

With the economic news these days, it's obvious that we Americans aren't handling our finances right. Way too many of us are carrying way too much debt. We keep it around like it's a pet and we feed it minimum payments every month. The problem, though, is that it keeps getting bigger and hungrier every year.

My wife and I are sick and tired of being broke. We make enough money to live a good life… that is, if we weren't sending way too much of it out each month to pay for the American dream. Dave Ramsey is fond of quoting from Proverbs (22:7): The rich rule over the poor, and the borrower is slave of the lender. As I look back over the past 10 years, it sickens me to think about the amount of money I've thrown away and how deeply I've sold my family's financial soul into debt.

Well, thanks to Dave's Financial Peace University and his book, The Total Money Makeover, we are taking back control.

Rant Mode: Off.

Anywho…

At the core of Dave's plan are seven baby steps, which he freely admits he has pulled together from other sources. Baby step 2 is the debt snowball. Geeks like me don't particularly like the debt snowball because of the math. You payoff the smaller debts first but they might not be the lower interest rate debts. So in the long run you might well end up paying more total. Dave prefers the snowball method due to the psychological impact of blowing away the smaller debts real fast. It really does help to build momentum and make the whole process easier over the long haul. The folks over at No Credit Needed put together a wonderful post illustrating how the debt snowball works.

The other common method of debt reduction is the debt avalanche. With this method, you payoff your higher interest rate debts first. This should, overall, be the fastest and lowest cost method of paying off debt… if you can stick with it. For example, what happens if you're highest interest rate debt is a $50,000 personal loan? What happens if it takes you 2 years or more to pay that off? Do you have the discipline and the motivation to sacrifice for years while you payoff that debt and then continue to the rest of the debts? Most of us don't and that's why we're in this mess in the first place. The psychological impact of quick victories is immense.

Whichever method you prefer, the key is to stick with it until you are debt free and in control.

Du or Du not. Who said "There is No Tri"?

Posted on August 14th, 2008 by dandavis
Tags:

Two years after dragging my body across the finish line of the Rock ' n ' Roll Half Marathon in Virginia Beach, VA, I've decided that I really need to get back into shape. And, to try and motivate myself to do that, I've set a goal to complete a triathlon by the end of the year. Depending on the event schedule in this area, I might miss that goal though I hope to at least be ready for a tri by January.

Since my weakest link prepping for a tri is my swimming, I decided to go ahead and register for a duathlon… I'm signed up to take part in the Cape Henry Duathlon & RunFest on November 15th.

Set Gmail as Default Mail Client in Ubuntu

Posted on June 23rd, 2008 by dandavis
Tags: , ,

A year ago at the How-To Geek: Set Gmail as Default Mail Client in Ubuntu.

I just started using Ubuntu in the past few days and found this post useful. But, because I'm me, I had to make a minor change.

My version is based upon a version in the comments of the original post with additions to support Google Apps for Your Domain.

#!/bin/bash

[[ $2 == "" ]] && domain="mail" || domain="a/$2/"
uri=`echo "$1" | sed -e 's/subject=/su=/' -e 's/^mailto:\([^&?]\+\)[?&]\?\(.*\)$/\1\&\2/'`
firefox "https://mail.google.com/${domain}?view=cm&tf=0&to=$uri"
Download open_mailto.sh.

To use it, reference the original post with one small change. If you need to specify a Google Apps domain, add it after the '%s':

/home/username/open_mailto.sh %s dandavis.com

Hope it helps.

Wanna know how to AWK it up?

Posted on June 16th, 2008 by dandavis
Tags: ,

A friend (I have lots of friends [no, really, I do]) recently asked how to use AWK to parse a really long file looking for specific strings and combinations of strings.

Unlike some of my friends, this friend knew that AWK was the right tool for job, so that was good. He just doesn't know it quite well enough to build a script to do what he wanted.

Almost everyone knows how to use AWK to extract a specific field from a line (or lines) of text… you do know how to do that, right?

awk -F: '{print $6}' /etc/passwd

This will print out the home directories of all the users in /etc/passwd:

$ awk -F: '{print $6}' /etc/passwd
/root
/bin
/sbin
/var/adm
/var/spool/lpd

And you can print multiple fields at the same time:

awk -F: '{print "User: "$1", Home Directory: "$6} /etc/passwd'

Will give a potentially more useful output showing the username and the home directory:

$ awk -F: '{print "User: "$1", Home Directory: "$6}' /etc/passwd
User: root, Home Directory: /root
User: bin, Home Directory: /bin
User: daemon, Home Directory: /sbin
User: adm, Home Directory: /var/adm
User: lp, Home Directory: /var/spool/lpd

OK, so now to the more interesting stuff…

My friend has a big ole CSV formatted log file exported from a Check Point firewall. It's got a whole bunch of useful information interspersed with some not so useful information… and it's frackin' huge. What he wants to do is search for accepted packets that are sourced from a number of subnets, destined to a single subnet, and are DNS requests. Actually a pretty straightforward parse.

Requirements:

  • Field 6 is the action: accept
  • Field 12 is the source: 192.168.*.*, 172.16.8.*
  • Field 13 is the destination: 10.11.12.*
  • Field 16 is the service: domain-udp

So, our AWK would look like:

gzcat exportedlog.csv.gz | awk -F, '\
      $6~/^accept$/ && \
      ($12~/^192\.168\./ || $12~/^172\.16\.8\./) && \
      $13~/^10\.11\.12\./ && \
      $16~/^domain/\
      {print}'

(Sorry, I don't have any output to put here, but if there were any hits from either of the two source subnets to the destination subnet, you'd see the lines printed out. Trust me… It works.)

You don't need to use the '\' and put each piece onto its own line… I just did that for readability.

I'm no AWK expert, nor do I claim to be, but hopefully you found this useful. There is a load of useful information at the GNU Awk User's Guide.

Cisco FWSM locked context restoration

Posted on June 15th, 2008 by dandavis
Tags: ,

OK, so you have a Cisco Firewall Service Module installed in a 6509 or 6513, whatev, and it's setup in multi context mode. It's running, it's got multiple contexts configured, it's passing production traffic and everything is honky dory.

Well, you decide to futz around in a new context and lock yourself out when you try to update the AAA config or some such thing… there are tons of ways you could do this… trust me… been there, done that. Now, if it weren't for all those production contexts running, you can just reload the blade and get back to your last known good config. But how can you recover without reloading the whole dag-blamed thing?

Well, assuming that you did not lock yourself out of the SYSTEM context and the ADMIN context still has IP connectivity to a TFTP server, then you can try to force feed some corrective commands into the context.

First, create a config file (e.g., BROKENCONTEXTNAME-restore.cfg) on your TFTP server that has the commands needed to correct the problem… I sure hope you know what they are… you do know what you did to screw it up and how to fix it right?

Then, once that's done, TFTP the restoration config file up to the FWSM:

host-FWSM# copy tftp://192.168.1.1/restore.cfg disk:/BROKENCONTEXTNAME-restore.cfg

Now, just cram that file down the context's throat… (This assumes that the context's regular and working start-config is saved in BROKENCONTEXTNAME.cfg):

host-FWSM# conf t
host-FWSM# context BROKENCONTEXTNAME
host-FWSM# config-url disk:/BROKENCONTEXTNAME-restore.cfg
host-FWSM# config-url disk:/BROKENCONTEXTNAME.cfg
host-FWSM# delete disk:/BROKENCONTEXTNAME-restore.cfg

At this point, all should be well. Go ahead, try it. If it didn't work, well, you screwed it up worse than you thought. You might just need to reload the blade… to hell with the production traffic.

Next Page »