Posts

'Twas the Night Before Elections

The GOP made me do it...and a friend who forwarded it. 'Twas the night before elections And all through the town Tempers were flaring Emotions all up and down! I, in my bathrobe With a cat in my lap Had cut off the TV Tired of political crap. When all of a sudden There arose such a noise I peered out of my window Saw Obama and his boys They had come for my wallet They wanted my pay To give to the others Who had not worked a day! He snatched up my money And quick as a wink Jumped back on his bandwagon As I gagged from the stink He then rallied his henchmen Who were pulling his cart I could tell they were out To tear my country apart! 'On Fannie, on Freddie, On Biden and Ayers! On Acorn, On Pelosi' He screamed at the pairs! They took off for his cause And as he flew out of sight I heard him laugh at the nat...

Is MedCo the Anti-Christ of drug suppliers?

I just had a frustrating experience with my health insurance company, UHC , and their preferred drug supplier, MedCo . My wife received a call from MedCo , and suggested that they could save us money on our prescriptions. Interestingly, they knew about every prescription my wife had, and the physicians that prescribed them. I'm sure the lawyers have that loop-hole covered... Back to our savings. They indicated they could save us plenty in co-pays, but my wife clearly stated our plan was about to change, and she needed to talk to me first, so NO, DON'T SHIP IT was the answer. Funny. The agent clearly knows more about my wife's health care, because a few days later, we received our first shipment of medication. My wife called and complained to the agent, who indicated they could not take the drugs back. She protested, and demanded to speak to the agents supervisor, who suggested we would have to submit an appeal in writing to UHC . Bah! I called a couple of days lat...

Awwwwww, crap!

After all the work I did on these batch files that decrypt PGP files, and un-tar the contents, I've found an error, and a pretty major *duh* one at that. Seems my logic was way off when it came to doing some date checking. Since the files I check have a naming convention that uses the previous days date, I was simply subtracting one from %TODAY%. Seems ok, right? No. This is the *duh* part. I simply subtracted 1. From 1001, that makes 1000. That's not a day, when you are using MMDD as the convention. What I was looking for was 930. NOT the same. SSSssoooooo, I added a bit I found on Experts Exchange (THANK you..for saving me MUCHO time). I was also having some issues trapping the ERRORLEVEL. Apparently, since FOR loops in DOS batch scripts are executed as one command, PGP never has a chance to pass it's exit code to my IF check, so this was also modified. The modded file is here .

shBrushBatch for Google SyntaxHighlighter

I really like highlighting my code in this blog. Ever since finding the Google SyntaxHighlighter Widget at FaziBear's , I've been going through all my old code, and cleaning up my posts. I read a nice article at WaltCo Tech about extending it to incorporate other brushes for WordPress. He also seems to do what I do, but a bit better when it comes to explaining things: WriteItDownNowBeforeYouForgetHowYouDidThatOldMan I'm really not that old, but I do tend to stick my fingers in many things, and coding tends to be one of them. At times, I'll find myself trying in vain to use a function from VB in PHP, or something of that nature. One of the hazards of not being fluent maybe? In any case, I've created my own brush for DOS Batch scripts: dp.sh.Brushes.Batch = function() { var builtins = 'APPEND ATTRIB CD CHDIR CHKDSK CHOICE CLS COPY DEL ERASE DELTREE ' + 'DIR EXIT FC COMP FDISK FIND FORMAT FSUTIL HELP JOIN ' + ...

Google SyntaxHighligter Widget

If you code, and like to save snippets like I do, you MUST get this .

More PGP Fun

This process outlined is not unlike what I wrote about in my post here , but involves a bit more logic. The script has to check for files that were posted that morning, but also have a file naming convention of the previous day. I've also got about 200 EMR postscript files to sort by date of service. First, the source PGP/tar files must be checked for existence, and must be a pair with the proper date formatted file name. @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION :: ////////////////////////////////////////////// :: :: Set path variables for key access, passphrase, :: and source our key files. SET PGPPATH=C:\PGP_keys\ SET PGPPASS=MYPGPPASS :: The "KEY" to a successful import of our keys is running these coMMands as the user :: that will be running this script. :: pgp +batchmode -ka %PGPPATH%SECRING.SKR :: pgp +batchmode -ka %PGPPATH%PUBRING.PKR :: pgp -ke 0xEC671710 > %_LOGFILE% ECHO -- START %DATE% - %TIME% -- >> %_LOGFILE% ECHO -----------------------...

Using Batch to decrypt PGP and more

Image
This script was recently written to automatically process files on our FTP server. They come in daily, in pairs, and dated with todays date, e.g. XXERUP0912.dat.pgp. The script checks for existence, ensures a pair is found, makes sure they are the right and same date, then decrypts them and calls an external program I wrote to inject them into a SQL database for querying via ASP, which I also wrote. If any of the steps fail, it gets logged, and an email notification is sent to a number of folks. I had a bit of an issue with expansion, but found the error of my ways in short order... @ECHO On SETLOCAL ENABLEDELAYEDEXPANSION :: ////////////////////////////////////////////// :: :: Set path variables for key access, passphrase, :: and source our key files. SET PGPPATH=C:\PGP_Keys\ SET PGPPASS=MYPGPPASS :: The "KEY" to a successful import of our keys is running these commands as the user :: that will be running this script. :: pgp +batchmode -ka %PGPPATH%SE...