Posts

Showing posts from December, 2016

PowerShell One-Liner: Get Public IP Quickly and Reliably

Image
Recently, three is a need to obtain the public IP information from the instance(s). While there are many ways, especially using the browser. I'd like to have a reliable and programmatic way. Here we have PowerShell and AWS. Following one-liner processes the result from  Amazon's checkip site  and then convert it into a beautiful System.Net.IPAddress object ready for use. :)

Weekend project: automate end-of-day with PowerShell, Pebble, and Wemo.

Image
Since I started to work from my home office several months ago, I've been enjoying making my work space (a.k.a man cave) the way I want. This weekend, I got a pebble 2 watch and a wemo switch  and explored the fun. ( Before pebble says goodbye.... ) Started by connecting the power bar to the the wemo switch, I could press a button in the app on my phone to turn on everything (monitors, speaker, computer...etc) even on a schedule if I liked. Well, that's okay. But at the end of 2016, I wanted to press less buttons and be able to... just make it happen. Talking into the watch and then turn on/ off my entire stack sounds like a modern and super cool idea! So the journey began. Aside from the hardware, few moving parts were needed: Something orchestrates the sequence of events based on triggers. Something on the pebble that understands my voice command and send it over to the orchestrating tool. Something on my computer that accepts the events and shut itself down. To allow