title: OS X Mountain Lion power assertions
body: <p>I'm trying to find some sample code or examples or good documentation on how to use power assertions on OS X programatically. 
  Mountain lion seems to kill the network access on system sleep, so Apple recommends to use power assertions to keep the system awake and to preserve network access available. 
  Appropriate command to modify power assertions is pmset, however I did not find any example on how to use it. 
  As a sidenote, Snow Leo and Lion don't seem to be having this problem, so I'm guessing this must be some power optimization setting introduced with Mountain Lion.
  Any code samples/example/documentation on how to set a power assertion programatically for an application would be gladly welcomed. </p>