Blog Archives

2015 in review


The WordPress.com stats helper monkeys prepared a 2015 annual report for this blog. Here’s an excerpt: A New York City subway train holds 1,200 people. This blog was viewed about 5,700 times in 2015. If it were a NYC subway

Posted in Fun-Stuff

Retrieve your blog posts from WordPress using REST API


If you own a wordpress blog and are curious as to how many posts you blogged with a particular tag, the Invoke-RestMethod is here to help you.

Tagged with: , , ,
Posted in Fun-Stuff, PowerShell

2013 in review


The WordPress.com stats helper monkeys prepared a 2013 annual report for this blog. Here’s an excerpt: A New York City subway train holds 1,200 people. This blog was viewed about 7,100 times in 2013. If it were a NYC subway

Tagged with: ,
Posted in Fun-Stuff

Using verbal expressions to make regex easy in PowerShell


What it means is that, we write ‘Four times X plus 3 equals seven’, and get ‘4x+3=7′. That example, could be a little misleading so let try it again, a valid url would consist of http at the begining of the line, maybe s if you are accessing a secure site, then it will have ://, maybe www. if you are so inclined to type and anything but a space. The aim of verbal expressions is to let you type the above and get a regular expression that matches a URL which is this: this:’^(?:http)(?:s)?(?:://)(?:www.)?(?:[^\ ])$’

Tagged with: , , , , ,
Posted in Fun-Stuff, PowerShell

Google search results using REST (custom search api) in PowerShell


Chanced upon Google’s custom search API while trying to see if there was a better way to retrieve the search results programatically.

Tagged with: , , , , ,
Posted in Fun-Stuff, PowerShell

Filtering data from SQL*Server Errorlogs


Select from SQL*server error log with context.

Tagged with: , , , , , , ,
Posted in Fun-Stuff, PowerShell, SQL Server

Shuffle the deck using PowerShell


Generate a random permutation of a given set of elements. Power-shell implementation of the ‘Fisher-Yates Shuffle’.

Tagged with: , , , , ,
Posted in Fun-Stuff, PowerShell

An attempt at Conway’s Game of Life using PowerShell


While watching ‘Stephen Hawking’s Grand Design’ couple of weeks ago on Discovery channel. Stephen Hawking was talking about how conscience evolves and how simple cells could evolve into complex beings. As an example, I saw the game of life come up and show how simple starting states can evolve into complex self-sustaining groups. This got me thinking, and while investigating how we code this game of life; I found that the rules are pretty simple. So, I started looking at doing this in PowerShell.

Tagged with: , ,
Posted in Fun-Stuff, PowerShell

Working with INI style files in PowerShell


Anyways, about year ago I was working on moving some parts of our deployment scripts to PowerShell. One of the things that was on the to-do list was parsing and building hashes out of .ini style files. It was not uncommon to find these files used for persisting configuration information and also for automation so, I assumed we would have a built-in cmdlet to cover this kind of a file. We do not have it.

It is a little disappointing but, since the structure of the file is almost static; we can code very easily around it.

Tagged with: , , , ,
Posted in Fun-Stuff, PowerShell

2012 in review


The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog. Here’s an excerpt: The new Boeing 787 Dreamliner can carry about 250 passengers. This blog was viewed about 1,800 times in 2012. If it were a Dreamliner,

Tagged with: , , ,
Posted in Fun-Stuff