This file contains hidden or 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
dotps1.github.io/PSGist/cmdlets.html |
This file contains hidden or 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
# Get all possible values of variable of dynamic Enum type | |
function Get-EnumInformation( [Object] $thing ) { | |
if( $thing -is [Enum] ) { | |
$type = $thing.getType() | |
} elseif( ($thing -as [Type]).baseType.fullName -eq 'System.Enum' ) { | |
$type = $thing -as [Type] | |
} else { | |
return $null | |
} |
This file contains hidden or 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
$result = [ordered]@{}; | |
[Environment+SpecialFolder].GetEnumNames() | | |
Sort | | |
ForEach { | |
$result += @{ | |
$_ = [Environment]::GetFolderPath($_) | |
} | |
} | |
$result |
This file contains hidden or 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 Test-PipelineAndBinding { | |
# Usage: | |
# | |
# . .\Test-PipelineAndBinding.ps1 | |
# Test-Self | |
[CMDLETBINDING(PositionalBinding=$False)] | |
[OUTPUTTYPE([String[]])] | |
PARAM( |
This file contains hidden or 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
Code Type | |
---- ---- | |
1000 Word for DOS 4.x | |
1001 Word for DOS 5.x | |
1002 Wordstar 5.0 | |
1003 Wordstar 4.0 | |
1004 Wordstar 2000 | |
1005 WordPerfect 5.0 | |
1006 MultiMate 3.6 | |
1007 MultiMate Advantage 2 |

This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
eyJ2ZXJzaW9uIjoxLCJjb250ZXh0cyI6W3sibmFtZSI6IkVtcHR5IiwiaW1nU3JjIjoiaWNvbnMvZG9ydG11bmQvY29uZmlnLnBuZyIsImljb24iOiJzaG93X2NvbnRleHQiLCJleHRlbnNpb25zIjpbXX0seyJuYW1lIjoiTWluIiwiaW1nU3JjIjoiaWNvbnMvZG9ydG11bmQvc3Rhci5wbmciLCJpY29uIjoic2hvd19jb250ZXh0IiwiZXh0ZW5zaW9ucyI6W3siaWQiOiJnaWdobW1waW9ia2xmZXBqb2NuYW1na2tiaWdsaWRvbSIsImljb24iOiJjaHJvbWU6Ly9leHRlbnNpb24taWNvbi9naWdobW1waW9ia2xmZXBqb2NuYW1na2tiaWdsaWRvbS8xNi8wIn0seyJpZCI6Imhkb2tpZWpucGltYWtlZGhhamhkbGNlZ2VwbGlvYWhkIiwiaWNvbiI6ImNocm9tZTovL2V4dGVuc2lvbi1pY29uL2hkb2tpZWpucGltYWtlZGhhamhkbGNlZ2VwbGlvYWhkLzE2LzAifV19LHsibmFtZSI6IlNoYXJlIiwiaW1nU3JjIjoiaWNvbnMvZG9ydG11bmQvY3VzdG9tZXJzLnBuZyIsImljb24iOiJzaG93X2NvbnRleHQiLCJleHRlbnNpb25zIjpbeyJpZCI6InBkY29oa2hoamJpZmttcGFrYWlvcG5sbG5kZG9mYmJuIiwiaWNvbiI6ImNocm9tZTovL2V4dGVuc2lvbi1pY29uL3BkY29oa2hoamJpZmttcGFrYWlvcG5sbG5kZG9mYmJuLzE2LzAifSx7ImlkIjoicGlvY2xwb3BsY2RiYWVmaWhhbWpvaG5lZmJpa2ppbGMiLCJpY29uIjoiY2hyb21lOi8vZXh0ZW5zaW9uLWljb24vcGlvY2xwb3BsY2RiYWVmaWhhbWpvaG5lZmJpa2ppbGMvMTYvMCJ9LHsiaWQiOiJnb2piZGZucG5ob2dm |
This file contains hidden or 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
& "C:\Program Files\Firefox Developer Edition\firefox.exe" -chrome chrome://browser/content/places/places.xul |
This file contains hidden or 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
╷ ╷ ╷ ╷ ╷ ╷ | |
64 128 256 512 768 1024 |