Thursday 27 May 2010

Multiline Comments in Powershell

It's hard to believe but you can't do multiline comments in Powershell for some reason! Shame on you Microsoft! Here is a bit of a hack to allow you to right comments over multiple lines using a multiline string declaration:

@'
This is a hack so
you can do a multiline
comment in powershell
'@ > $null

Points to note...

  • The closing '@ has to be in column 0
  • No whitespace allowed after the opening @'
  • Redirect the output (or cast to [void]) unless you want to see it on the console or in a log file

Wednesday 26 May 2010

Internet Explorer 5.5 / 6 PNG Issues

Most web developers are aware of the IE alpha transparency problems with PNG images; or will be before long. A lot of developers use GIF images rather than the superior PNG format for this reason; which is a shame.

I was discussing the issue with Alex over at Prettier Pixels (a talented UK freelance website designer and builder) and he suggested this nifty IE PNG fix by TwinHelix that you can use to avoid the issues. Thanks Alex!

I long for the day when IE 6 support is no longer required!

18/30

I only managed 18 out of my 30 target for April and I've been too ashamed to post anything since :'(

Suppose I'd better get back on that horse and see if I can start getting some helpful blog posts back up on here!