This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Parse-SizeUnit { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true)][string]$SizeUnit | |
) | |
$SizeUnit = $SizeUnit.Trim() | |
$Size = 0; | |
$Unit = 'B'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Parse-SizeUnit { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true)][string]$SizeUnit | |
) | |
$SizeUnit = $SizeUnit.Trim() | |
$Size = 0; | |
$Unit = 'B'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ConvertTo-Object { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true, Position=0)][string[]] $StringArray, | |
[int] $PropertiesRowIndex = 0, | |
[string] $Separator = '\s+' | |
) | |
$Properties = $StringArray[$PropertiesRowIndex] -split $Separator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"schemaVersion": "2.2", | |
"description": "Map Disk Drives to EBS Volumes", | |
"mainSteps": [ | |
{ | |
"name": "DisksToVolumesMappingWindows", | |
"action": "aws:runPowerShellScript", | |
"precondition": { | |
"StringEquals": [ | |
"platformType", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getQueryString() { | |
var qsDict = {}; | |
var qs = location.search.substr(1).split("&"); | |
function decode(s) { return decodeURIComponent(s.replace(/\+/g, " ")); }; | |
for (var i = 0; i < qs.length; i += 1) { | |
var qKV = qs[i].split('='); | |
if (qKV.length > 1) { | |
qsDict[decode(qKV[0])] = decode(qKV[1]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports System.ComponentModel.DataAnnotations.Schema | |
Imports System.Data.Common | |
Imports System.Data.Entity.Core.Metadata | |
Imports System.Reflection | |
Imports System.Data.Entity | |
Public Class EFSqlBulkCopy(Of T As Class) | |
Public Property DestinationTableName As String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports System.ComponentModel.DataAnnotations.Schema | |
Imports System.Reflection | |
Imports System.Runtime.CompilerServices | |
Public Module IEnumerableExtensions | |
<Extension> | |
Public Function SortBy(Of T)(list As IEnumerable(Of T), sortByParams As String) As IEnumerable(Of T) | |
If String.IsNullOrWhiteSpace(sortByParams) Then | |
Return list | |
End If |