Showing all posts tagged: 'Utility'

A 3-post collection

Configure a RunOnce task on Windows

Today was one of these days. Faced with a new problem I've never come across before. I was trying to configure a task to run once and only once on the server was provisioned for the first time. Something like a bootstrap script. In my quest to solve that problem, I came across a thing called Run and RunOnce registry keys! What are Run(Once) registry keys? Who knew that these things even existed, but here we are. So what do these keys really do? Let's grab the definition from the official documentation on MSDN Run and RunOnce registry keys …[read more]


Get URL parameters using JavaScript

This one will be quick and easy. I'm currently working on an Angular.js/MVC application and I need to grab the URL parameters from the current page. Simple right? Well not so much. Firstly, I'm not using ngRoute and, secondly, I don't want to use any other external library/utility. Just plain, old, vanilla JavaScript. How did I do it then? Parsing URLs with JavaScript I've created a simple method to manage this. The method is pretty straightforward. It takes a URL, parses the parameters with a bit of RegEx 'magic' and then returns an object with our parameters. …[read more]


Generate ASCII folder structures on Windows with Tree

I was reading through Adron Hall's post yesterday about generating ASCII trees on Linux and Mac OSx. This is a handy feature if you want to include a project/folder structure to your documentation and don't wish to copy paste screenshots. What is an ASCII tree you may ask? There you go: Say hello to the tree command. This MS-DOS command has been around since Windows XP (YES really) but it's not well advertised. I only found out today and that's 14 years late! This is how to use it: Open your favorite command line editor (I jump between Powershell …[read more]