Category Archives for Code

How to batch change the date received on Office 365 mail

Sometimes bad things happen to good mailboxes. We were recently doing a fairly standard mailbox migration from Google Apps to Office 365. This mailbox in particular was about 30 GB and had mail going back 20+ years. It also had some previous migration history.

The History
Nothing too unusual here. In 2014 the mailbox was migrated off of Exchange server and onto Google Apps. Now, in 2017, it was being migrated from Google Apps to Office 365.

Everything went perfectly, but there was one problem. A large portion of the mail was showing an incorrect date received. During the initial migration, Google Apps had set the Received Date to be the date of the migration on a large portion of messages.

Continue reading

Split And Encrypt PDF

Why
At my company, we recently had a need internally where we wanted to split and subsequently encrypt each page of a PDF. In our exact case, we wanted to split a payroll PDF file into individual paystubs based upon the employee's name. Once we had each page separated, we also wanted to encrypt the employee's paystub using a password that they provided.

Check it out on github 

Continue reading

C# replacement of ODWEK applet

NOTE: I've recently coded this up the "correct" way using the Java Api. See here: https://www.michaelwda.com/odwek-middleware-with-spring-boot/

NPAPI
Google Chrome completely removed NPAPI as of September 2015. http://www.chromium.org/developers/npapi-deprecation

I think most people would agree that this is a *good* thing for security and web-standards. Remember when Apple said NO to Adobe Flash on the iPhone and everybody went crazy? I feel like history has proven that decision the be correct, and this is just an extension of that.

Anyways, google provided plenty of notice that they were going to do this. They even deprecated the feature, but left a way to turn it back on for a short time. A smart developer would have seen this and been hard at work implementing a new solution that doesn't rely on NPAPI. Apparently, I am not smart.

As a consultant, I'm not really in the seat most of the time. I was using an IBM applet that relied on NPAPI it and it worked, so everything was good. I eventually got the call that the ODWEK viewer wouldn't load and they couldn't view receipts. The client had to go back to using the desktop client instead of being able to click the link from the CSR portal I had written. Sure, they could just switch to IE, but I decided to go a different route.

Continue reading