Posts

Gmail - Purging promotional emails

Image
Today I thought I would go about looking for a a way to set some sort of "Expires after x days" type rules. I don't mind getting promotional emails though I find every few months after neglecting to purge these from my inbox they amass to a level where I spend a day or two worth of "on the train" time bulk deleting them. I came across https://www.johneday.com/422/time-based-gmail-filters-with-google-apps-script which gave me what I was aiming to do using Google scripts.

Gallery updates

I finally got a few hours to backup my camera and start pushing some of the latest pictures to my gallery . At the same time I noticed that Smugmug (on July 30th of last year) updated their themes. I must say I'm very happy with the refresh, even if I'm taking it about six months late. The latest albums to go up include the trip Fran and I took to The New Forest last July.

My favourite merge tools

When updating my user profile I lost some configuration settings which of course I had to go lookup again. I thought I would write them here for reference (mainly mine!). I like using the Perforce p4merge tool rather than the stock diff/merge tools and find this to be one of my favourites with BeyondCompare my second favourite and top choice for comparing directories. P4merge is great as you can install just the merge client when running the installer skipping out on the Perforce client and get this great merge tool (for free) even if you aren't using Perforce as your VCS. I have included commands for TortoiseGit here but with minor adjustments they should apply to most VCS tools: Diff viewer: C:\Program Files\Perforce\p4merge.exe %base %mine Merge tool: C:\Program Files\Perforce\p4merge.exe %base %theirs %mine %merged

Windows 8.1 - won't upgrade if you move your profile directory

Yesterday I setup my computer user profile again after upgrading to Windows 8.1 from 8.0 as and got caught by a little issue where if you prefer to have your documents and profile on another disk and have it linked it essentially blocks Windows from upgrading. So I abandoned my NTFS symlink for re-pointing the various Libraries (which is apparently the way you are supposed to do this now). Anyway, I decided to just copy several chunks of settings from the AppData on an as needed basis across which has worked out rather well. The biggest challenge I had was finding where all my application list went. I finally found the subtle arrow below the first column of icons that will give you your full "Programs" list. I must say I do like that they merged the search. It was driving me nuts typing in "settings" related commands and having to then click on the settings search to see them.

Programming competition

It has been about 10 years since I competed in a computing competition and couldn't resist the opportunity when Infusion decided to kick one off this past weekend. I managed to have a few answers accepted which was good. I also managed to keep focused on one thing for 5 hours which rarely happens these days and was somewhat refreshing. Did I win? Definitely not, though I did remind myself how it feels to be under pressure to solve logic problems and the winning feeling when the answer is accepted. That winning feeling is something that on my current engagements can take weeks or months to savor.

Skills Canada 2013 in Vancouver

Well it is that time of year again and I am about to hop on a plane to Vancouver for the 19th annual competitions for Canadian youth from across the country. You can see the event details on the Skills Canada website . The event takes place all day is at BC Place on June 6th and 7th.  I am involved in the IT Systems Administration competition where competitors are required to demonstrate expertise in constructing and managing a basic computer network and related infrastructure for a small to medium sized business.

Clearing the mouth balls

It has been a long time since my last post. A combination of factors and priories have made blogging take a back seat. Since there is never a better time than now to do something you want to I am reincarnating my blog.

Handling custom errors in WCF

[ Download Full Solution ] In WCF the preferred way to handle custom error/exception states is through creating an object that can be serialized containing the fault information, and assigning it against an OperationContractAttribute decorated method using the FaultContractAttribute . Assigning a FaultContractAttribute provides an alternate object type to pass back to the client. The default action on the client is to raise a FaultException<MyCustomFault> which allows for the returned fault to be returned in the generic type.

Custom Proxy Generation using "RealProxy"

[ Download Full Solution ] I've been looking around the top side of the WCF client proxy for a nice place to hook in contract specific caching. I was hoping to find soemthing similar to the IOperationInvoker on the server end. Unfortunately I couldn't find anything that allowed for me to fully divert the flow and avoid a service call. You have the ability to inspect the parameter listing (pre-validation), and the message (further validation or header injection) after serialization (which you can also adjust) but at no point can you just return a value within the pipeline...

Changing the type of a returned object in WCF

[ Download Full Solution ] Every once and a while the returned object type from a service is too simple/generic, and a more rich, or specialized object would be a better fit. This is typically easy to achieve by instructing a new type that's comparable with the same service contract to be the resulting type. What about if one XML representation could best be described as multiple classes though? What this article tries to demonstrate is how to closely manage the DataContractSerializer in such a way that the returned type through the WCF endpoint is the desired type, while remapping it at the level of the serializer if appropriate. What we have below is how we are going to update the DataContractSerializer to do our bidding. We are going to create a new implementation of IEndpointBehavior which will update the DataContractSerializer on the operational contracts of the assigned endpoint. <?xml version="1.0" encoding="utf-8" ?> <configuration> ...