Saturday, December 20, 2014

How does flying affect my CO2 emmissions

Using very rounded numbers for simplicity and a not very scientific approach, it does still make you think.
In 2000 the world's greenhouse emissions were 34 billion tons of CO2-equlivalent per year and the approximate population of the world is 6 billion.
So roughly we can say that the average emissions per person is 5 or 6 tons of CO2-equivalent per year.

Average person's emissions = 6 tons

A typical round-trip intercontinental flight (whatever that is) emits about 2 tons of CO2 per passenger.

Average round trip = 2 tons
So one trip per year is something like a third of the average person's carbon emissions.

Please read the excellent (and free) book Sustainable Energy without the hot air from David JC Mackay 2009

Saturday, December 13, 2014

Powershell help - The three most important commands in the Windows PowerShell

Just starting out with the Windows PowerShell and I think the most important command are:

  • Get-help - first line support, what do I do?
  • Get-command - found the command, How do I use it?
  • Get-member - What does this do? List it's members.


It accepts wildcards and is not case-sesitive.
get-help *service* 
will list all topics that have object in the topic.

You can find more info about the topic by asking for help on the name of the specific.
get-help start-service
This help text is very useful but there's even more.

The full help can be found by using the verbose parameter, full
get-help start-service -full


get-command -noun service 
This will list all the commands with the word service in the name.

You can also look for a verb, e.g.
get-command -verb get


To use this we need to use the pipeline command which is:
Basically, without explaining pipelining, the output from the first command is filtered into the second.

So. I have found that the command I am interested in is get-service.
I want to find the members of that service. So I pipe the command into the get-member command.
get-service | get-member
 Running the above we find the Properties and Methods for the command get-service

And one other thing:


If you're unsure what a command will do, then add the -whatif parameter and let PowerShell tell you what will happen.

stop-process -name * -whatif