Skip to content

Instantly share code, notes, and snippets.

@tonylea
tonylea / Get-FrameworkVersions.ps1
Created August 8, 2016 09:33 — forked from drmohundro/Get-FrameworkVersions.ps1
PowerShell script to return all installed .NET Framework versions.
<#
.Synopsis
Returns the install .NET Framework versions.
.Description
The script looks through the registry using the notes from the below
MSDN links to determine which versions of .NET are installed.
@tonylea
tonylea / Boxstarter.txt
Created July 28, 2016 13:43
Boxstarter config
Set-ExplorerOptions -showHiddenFilesFoldersDrives -showFileExtensions
Enable-RemoteDesktop
Disable-BingSearch
cinst 7zip
cinst adobereader
cinst autohotkey
cinst cyberduck
cinst git
cinst googlechrome
@tonylea
tonylea / gui-boilerplate.ps1
Created April 16, 2016 00:44
PowerShell GUI Boilerplate
Function Get-FormVariables {
if ($global:ReadmeDisplay -ne $true) { Write-host "If you need to reference this display again, run Get-FormVariables" -ForegroundColor Yellow; $global:ReadmeDisplay = $true }
write-host "Found the following interactable elements from our form" -ForegroundColor Cyan
get-variable WPF*
}
# Create WPF C# Form is Visual Studio and copy the XAML data
@tonylea
tonylea / rangedArray.js
Created April 10, 2016 18:29
Create a array filled with range of numbers
function rangedArray(start, end){
if (arguments.length === 1) {
end = start;
start = 0;
}
end = end || 0;
var step = 1;
for (var result = []; ((end - start) * step) > 0; start += step) {
result.push(start);
@tonylea
tonylea / SortArrayNum.js
Created April 10, 2016 17:21
Sort array of numbers correctly
function sortNumber(a,b) {
return a - b;
}
var numArray = [140000, 104, 99];
numArray.sort(sortNumber);
@tonylea
tonylea / GetLockoutLocation.ps1
Created March 10, 2016 14:32
Get Locked Out Location
#requries -Version 2.0
<#
.SYNOPSIS
This script is PowerShell script which can be used to get location of locked out user account.
.DESCRIPTION
This script is PowerShell script which can be used to get location of locked out user account.
.PARAMETER SamAccountName
Specifies the SamAccountName of user that you want search.
.EXAMPLE