How to create simple DTO “object” in PowerShell

Why this sample : I needed simple and short solution for creating custom DTO objects with simple logic for later reuse elsewhere. Function essentialy takes “constructor” argument and returns object with properties that have getters with small piece of logic and are using constructor parameter….

Simple PowerShell snippet to search file or array for content

Since I play these days a lot with PowerShell I need from time to time some simple functionality. Sometimes dead simple. Like today , snippet to search file content or array of data if you will and return true/false if text is present in it….

CodeCon 2014 stuff

Dokument : https://docs.google.com/document/d/1hpCYaLHdhFyg9OOnhz-NW_7trcWMGt62xRRxEcyeH6Q dokument si môžete uložiť ako pdf alebo docx, feel free to abuse GitHub repo : https://github.com/rostacik/CodeCon2014TSSamples VS2013 Update 4 TS projekt na hranie s pár samples

PowerShell Tools for Visual Studio 2013 – unable to run and/or debug PowerShell script – execution policies problem

The problem : Some time ago I wrote this article : https://rostacik.net/2013/11/13/powershell-tools-for-visual-studio-2012-problem-ps1-cannot-be-loaded-because-running-scripts-is-disabled-on-this-system-for-more-information-see-about_execution_policies about my problems running and debugging PowerShell scripts in VS 2012 with help of http://visualstudiogallery.msdn.microsoft.com/e3f9d3bf-e630-4b3e-968a-f86ac67b836c – PowerShell Tools for Visual Studio 2012 – wonderful tool by Adam Driscoll. Currently after switching to Windows 8.1 + VS…

JavaScript Visual Studio snippet for is object defined check

Since I write a lot of JavaScript currently in Visual Studio these days, I lack one of the very common checks in JavaScript and that is testing if object exists. I mean this check : [javascript] if (typeof (someObject) !== ‘undefined’) { someJSCodeHere(); } [/javascript] If you want to use…