Sample code for inverting 4-digit 7-segment display

Go from this:

To this:

Demo and explanation on my blog here.