Wednesday, January 28, 2009

Finding stuff in Unixland with Grep or Find

Sometimes you need to find something somewhere in your filesystem. Forget where thought. You remember it was in a PHP file somewhere, though.

The classic way I was taught was with a find -exec {} command:

find . -name "*.php" -exec grep -H "title phonetitle" {} \;

But, in reading the man page for grep, I see it has a -R option, for recursive. So, which is faster? Find or grep?

First, the classic find -exec command. I've suppressed the output from grep for clarity:


[buzzaboutwireless@ad cms]$ time find . -name "*.php" -exec grep -q "title phonetitle" {} \;

real 0m0.657s
user 0m0.182s
sys 0m0.487s


Now, for the recursive grep:


[buzzaboutwireless@ad cms]$ time grep -Rq "title phonetitle" .

real 0m0.251s
user 0m0.083s
sys 0m0.165s


Way faster. Neat. Less typing too.


Next: To prove black is white. I'll just remember to watch out for the zebra crossings.

Tuesday, January 20, 2009

Stop Foreclosure Scam

Two men convicted in Kansas foreclosure scam - Kansas City Star:

"The government accused the men of persuading people behind in mortgage payments to pay a monthly fee to stop foreclosure proceedings.

Under federal law, a bankruptcy filing triggers an automatic freeze on foreclosure sales."

Always wondered how many of those ads you saw were just wrappers around a bankruptcy filing. Now we know at least one was...

Saturday, January 10, 2009

Heck of a Good Deal!


Got an offer in the mail today where I could earn up to $200 a year back on my purchases.  Pretty good deal - and as an incentive, they gave me two checks for $5.00 each - so up to $210 the first year, and I'm $10 up right out the gate!  Nice deal!

Check the fine print though - by cashing the checks, you agree to be enrolled in two different 'savings' programs, at an annual cost of $120 per year, per program.

So, the net savings by enrolling is this great deal?

$100 savings, program 1
$100 savings, program 2
-$240 membership fees
--------
-$40 cost out of my pocket, just so I can 'save' some money.


Oh, I forgot to mention the free week of Jazzercise lessons they'll throw in.

Seriously.

Reading the fine-fine print, turns out to get this $200 back, you have to save all your purchase receipts, and mail them into a special PO box one time per year.    Very nice.  How kind of them to only require a single mailing per year of receipts.

So, just for some Googlefodder:  Buyers Advantage is a SCAM.  Just for Me is a SCAM. Ripoff.  Complaint.  HSBC.  M. Tremaglio. 

Monday, January 05, 2009

Izza Dog!

Saturday night, Alec and I went to see Marley and Me - a movie about the worlds worst dog. Last week, we had decided that we didn't want to get a dog right now. Ok, well, I decided.

After seeing the movie - what'd we decide to do? Get a dog. Went to The Pet Connection in Mission KS to see who was there and they had a pair of 7 month old black lab mix puppies. One of them is home with us now.

His name is either 'Sam' or 'Doc'. He came from the shelter as Sam, and for a couple of hours we tried out Doc. Doc is too close to Dog, though...

Bizzare situation - they were raised in Osceola, MO at the shelter. Dropped there as 8 week pups. How they could fail to adopt a lab puppies I don't know, but my good fortune (?). So, Sam (or Doc) is effectively a blank slate. No bad experiences, no real training either. And he's never seen stairs. Will not go up or down the stairs in the house for love or treats. Sigh.

Should be an interesting time. He does sleep well in his kennel fortunately. And the cats are doing just as I hoped they would - Kiki is hiding all day and Random just looks at the dog like a disease. Sam looks at the cats no differently than furniture, so that's good so far. Not letting him roam alone in the house for a few months though.




Saturday, January 03, 2009

Be Happy

From a Slashdot post of all places:
One of the best and most lasting ways of becoming happy is to surround oneself with people that makes you feel happy. If the people around you do not make you happy, it's not their fault. You're responsible for your own happiness. You choose them. Choose people that makes you feel happy.

Friday, January 02, 2009

Fail

 New year, time to check the finances. Epic Fail.   I've seen worse, but not by much.



Sunday, December 28, 2008

Lenovo Ideapad S10 2 GB RAM and 6-cell battery upgrade

Lenovo Ideapad S10 2 GB RAM and 6-cell battery upgrade:
"For the Lenovo S10 you need a DDR2 PC5300 SODIMM (this will not fit into a standard SDRAM SODIMM socket). A SODIMM, or small outline dual in-line memory module, is a smaller alternative to a DIMM, being roughly half the size of regular DIMMs. SODIMMS are often used in systems which have space restrictions such as notebooks and netbooks.

Lenovo's IdeaPad S10 netbook is easy to upgrade. The S10 has 512MB soldered onto the motherboard and only one SODIMM slot. If your S10 comes with more than 512MB preinstalled, than there's already a SODIMM in the slot and you will have to remove it first. The motherboard also cannot recognize more than 2GB in total, including the built-in 512 MB. A 2 GB DIMM will give you 2 GB, not 2.5 GB, because the last 512 MB will be ignored"
Click the link above to get linkies to ram, batteries.  Or just search Amazon.  Sweet.  

Now to decide 'tween Dell Mini 9 and Lenovo S10.

Mac OS X Netbook Compatibility Chart from Boing Boing Gadgets

Mac OS X Netbook Compatibility Chart (updated) - Boing Boing Gadgets: Got a Netbook for Christmas?  Want to make it an hackintosh?

The linked page has all the dope.  Their summary?  "get an MSI Wind or Dell Mini 9."

Monday, December 22, 2008

Doh!


Doh!
Originally uploaded by kcsporttour
Posted without comment.

Update 6:45 PM:
Everyone is OK; Carol's car is not. Just the fender damage but I'll assume the insurance will total it out one way or another. (91 honda, 200K miles . . .)

More photos from the scene:





Saturday, December 20, 2008

Signs

Took Alec and his mom to Kaleidoscope today. Alec had fun. I was a touch bored. Till I saw the sign board. Then I wasn't bored - I had a board!




Then leaving, I see someone else had a sign.


Update: Made a playlist (channel) page for this. View all current and future 'signs' videos from one place.

Alec and Mom at Kaleidoscope


Alec and Mom at Kaleidoscope
Originally uploaded by kcsporttour
--
Will England, 'travellin with the touch pro'
wengland@gmail.com

Alec at Crayola Store


Alec at Crayola Store
Originally uploaded by kcsporttour
--
Will England, 'travellin with the touch pro'
wengland@gmail.com

Nuts about Nuts?

BBC NEWS | Health | Warning of nut allergy 'hysteria':
"Measures to protect children with nut allergies are becoming increasingly absurd and hysterical, say experts.
A peanut on the floor of a US school bus recently led to evacuation and decontamination for fear it might have affected the 10-year-old passengers."

Facts: there are 2,000 hospitalizations a year (out of 30,000,000 total) for all allergic reactions.  Just 150 people a year die from food allergies.


Professor Nicolas Christakis, a professor of medical sociology at Harvard Medical School, notes that the hysteria about nut contamination looks more like mass psychogenic illness. (See: Salem Witch Trials, etc.)

Are we Nuts about Nuts?  Yup.  

Interesting article about The Role of the Media and Media Hypes from Johns Hopkins. 

Friday, December 19, 2008

Tree is up


Tree is up
Originally uploaded by kcsporttour
--
Will England, 'travellin with the touch pro'
wengland@gmail.com

Accuracy vs Precision


Fiddling with new toys - got a $5 oven thermometer and a $40 meat thermometer.  Set the oven to 350 - nice digital display, so it *should* be accurate and precise.

Testing that theory.  The $5 oven thermometer reads precisely 10 degrees low - the oven claims it's at 350 degrees; the thermometer reads 340.  The $40 meat thermometer shows the initial warmup overshot to 375 degrees, then cooled to 365, even after opening the oven several times to check the $5 thermometer.


After about a 10 minute 'rest' -- long enough to type up this blog post - the $40 meat thermometer has dropped to 351 degrees.  I think the oven agrees - I just heard the relays kick on to re-energize the heating elements.  The $5 thermometer still shows low - 342 or thereabout.

After a 20 minute 'rest' and a full heat cycle the oven thermometer now shows 160, and the meat thermometer shows 165 degrees.

So, which is right?  I don't know.  They are all precise - same measurements every time.  But until I can find a definitive answer, I'm out of luck for accuracy.



Update: Thought of a new test. We know how hot boiling water is - 212 degrees at sea level. Well, I'm 1,000 feet above that, but I pulled a pan of hot water (less dissolved solids) and set it to a rolling boil. The meat thermometer registered 212 degrees. So it is accurate and precise.  The oven thermometer isn't submersible, so no way to test it - but comparing against the meat thermometer it appears to read within 10% or so, just slowly.

The good news is that the oven display is right on the money, at least good enough for home use.

Monday, December 15, 2008

Messy basement


Messy basement
Originally uploaded by kcsporttour
Took this with the panorama feature on the touch pro. Pretty dang fancy.

--
Will England, 'travellin with the touch pro'
wengland@gmail.com

Saturday, December 13, 2008

CNN misses, Google Hits.

Earlier today (yesterday, now) nuclear armed India invaded nuclear armed Pakistan -- quick action by Pakistani air force jets headed off the attempted invasion.  Ok, the news calls it 'airspace violations'.  At least some of the news.  CNN - not so much.  A search at 10:00 PM CST, Dec 13 shows zero hits for Pakistan Airspace on CNN:

pakistan airspace - Search results for pakistan airspace - CNN.com

The same search on Google News turns up 539 hits. 

What's CNN up to?  Or are they just bound and determined to go tango-uniform?  (toes (tits) up - Dead)