Skip to content

Still, nothing happening.

June 22, 2009

I hope my blog doesn’t just sit there.  Please, let me find inspiration!

Advertisements

Nothing is happening.

April 24, 2009

I feel lazy, and I don’t feel like updating my page for a bit.

Using AWK – print only phone numbers out of unstructured, unreliably columnised lines

December 15, 2008

Sorry about the g33ky post, but i was looking for an example of how to use awk for this circumstance.  There’s probably another text-manipulation cli app to do the job, but i just wanted to use awk for this one.

Note: Solaris awk is known to be buggy. us the xpg4 version on all solaris boxes, or the “match” function wont work.

1 line of data set example:

20081210 133924638-0500 mmsrb owmmsrelay 193 46 46 Info;MMSRelayTxnLog(220/101)193:46:lc=Op ct=owmmsrelay op=MMBox_view.REQ ms=4.63 uid=114944517818131292 size=0 SrvcID=MMS AppID=”Openwave MMS Relay” AppHost=10.33.233.131 AppPort=8088 MsgID=AElADNwAEADBAC4KIe6D OrigIF=WEB RcptIF=WEB OrigAddr=”+19046219845/TYPE=PLMN” RcptAddr=”+19056219845/TYPE=PLMN” NumRcpts=1 EvTime=20081210133924 EvStatus=Success Folder=INBOX TrackID=AElADNwAEADBAC4KIe6D PeerHost=10.33.238.131 PeerPort=55476

Read more…

A Great Horsepower to Torque Conversion Chart

November 5, 2008

I was just working on a project tonight – and ran across this great chart.    It’s an old-fashioned draw-a-line 2D calculator.

So it’s possible to have 100HP at with 10000lbs of Foot-Pounds torque at 60 RPM.  Then you break your engine.  Enjoy!

Thanks to the electric toolbox http://www.elec-toolbox.com/ for the graphic.

horsepower-to-torque-conversion-chart

Horsepower to Torque Conversion Chart

Careful. These Outlet Wiring Instructions are Wrong.

October 19, 2008

Today I went to the hardware store (LOWES) and bought a 10-pack of decorative electric outlets.  I picked the “Pass & Seymour” brand.  I pretty much know what I’m doing with electrical, but I always like to read instructions.  That’s when I got stymied.  I sat there for 10 minutes comprehending what it said.  I put down the tools and hit the net.  30 minutes later and I could only come to 1 conclusion – the instructions shipped with it were wrong!

Normally, I’d suspect bad instructions to be from China, but these electrical outlets are stamped “Made in U.S.A.”.  

Take a look … do you see anything wrong with the illustration?  

First off, you can see that the plug appears “upside down”.  Actually, this is normal – and it makes sense.  Sometimes a power cord has sufficient weight to “ply” it away from the wall socket, exposing a small portion of the prongs.  I suppose it’s better to have the ground exposed, than the two contact points that carry the electric current. 

The real culprit here is not the orientation of the outlet, but rather the positioning of the prongs in relation to the ground pin.  Normally, the larger Neutral slot should be on the lower right, and the smaller HOT slot should be on the lower left (in the upside-down mounting).

 

 

Now take a look at the actual outlets themselves, and you will see how it should be. 

Ordinarily, bad instructions results in having to take things apart.  In this case, it could result in a DIY’er burning down the house.  I think Pass & Seymour better consider a recall… 

 

The days are getting shorter – Perl Script to Calculate Sunrise and Sunset

October 11, 2008

Hi Everyone;

I made a great perl script to calculate sunrise and sunset times in Toronto for the whole year with a graphical output. I wrote this in my dead-time during a work order tonight… so I hope you enjoy it as much as I enjoyed making it.

Notes:

  • my brother’s birthday, which is right around the corner is day 286.  That’s a g33ky number.
  • Here’s a day-of-the-year number calendar .
  • does not account for Daylight Savings Time changes
  • the output is in decimal form (.1 hours is about 6 minutes)

How to understand the output

————-***********************————–      Day: 286 , sunrise: 7.46371983255512 , sunset: 18.6748421708946 

  •  
    • The —– is darkness (night)
    • The ******* is sunlight (day)
    • sunrise 7.46371….  is the time local to toronto at GMT -4 (7.46 = 7 oclock + (.46 * 60 minutes) = 7:27am

 

Sample output.  If you scroll through enough lines, an “hourglass” shape starts to appear:

# ./sun.pl
----------------******************----------------      Day: 1 , sunrise: 8.8499964506844 , sunset: 17.8363243941365 
----------------******************----------------      Day: 2 , sunrise: 8.85157917721863 , sunset: 17.8505635052382 
---------------*******************----------------      Day: 3 , sunrise: 8.85247026342554 , sunset: 17.8653183755327 
---------------*******************----------------      Day: 4 , sunrise: 8.85266811641787 , sunset: 17.8805734993673 
---------------*******************----------------      Day: 5 , sunrise: 8.85217187255689 , sunset: 17.8963130190473 
---------------*******************----------------      Day: 6 , sunrise: 8.8509813847397 , sunset: 17.9125207658933 
---------------*******************----------------      Day: 7 , sunrise: 8.84909720761213 , sunset: 17.9291803019326 

Here’s the perl code to support it.  A lot of it was based on http://www.adventist.org/sun/sun.pm .  Obviously, i did a lot of reworking of the ideas into my own script.  Click MORE for a special suprise (and the code)

Read more…

Does anyone know what kind of butterfly this is?

September 18, 2008

Hi Everyone;

Just wondering if anyone knows what kind of butterfly this is? I’m really quite sure it’s not a monarch.

Location: Markham (Toronto), Ontario, Canada
Date : September 17, 2008 @ 3pm EDT

Click the image for better resolution.

What butterfly is this?

What butterfly is this?

Update:

I sent an email last night to a butterfly professional.  Here’s the response:

It is a Compton Tortoiseshell butterfly. I photographed a few of these a week
or two ago.
They are very similar to Coma and Question Mark butterflies.
Gord

Thanks Gord!  Look at his great site about butterfly watching in Ontario site at : http://www.web-nat.com/Butterfly/