Skip to content

Instantly share code, notes, and snippets.

Chris Hunt cdhunt

Block or report user

Report or block cdhunt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Get-WebExample2.ps1
PS C:\> Get-Web -Url -AsMicrodata -ItemType | Export-PSData .\

I agree with you, but prefer to decouple philosophy from tools. It's just semantics, but in the history of business organization there is a tendency to distill a philosophy down to a few bullet points and believe following those bullet points is all that is needed to be successful. One of the bullet points is usually, "Use XYZ tool." Just putting up a board with cards on it isn't likely going to make your business more successful. It's just a tool. You have to learn how to use it. Sorry if you took my weakness with words as an attack on your efforts to do just that.

cdhunt / Posh2013_Event5
Created May 30, 2013
Second attempt at Event 5 based on what I learned from feedback and judging other scripts.
View Posh2013_Event5
function Select-UniqueClientIP {
cdhunt / APIExample
Created Jul 29, 2013
Example of marrying REST API and Windows COM API through Powershell.
View APIExample
function Out-Speech($text) {
$speechy = New-Object –ComObject SAPI.SPVoice;
$voices = $speechy.GetVoices();
foreach ($voice in $voices) {
$speechy.Voice = $voice;
cdhunt / Get-NetworkHostList
Created Jan 13, 2014
Part of 2014 Scripting Games Practice Event
View Get-NetworkHostList
Return an array of IP Addresses
Return an array of System.Net.IPAddress objects from a string in the form
Return an array of usable IP addresses given a subnet.
PS C:\> $IPs = Get-NetworkHostList
PS C:\> $IPs[0].IPAddressToString
View PingSweep
Import-Module PModule.psm1
$Credential = Get-Credential
$ips = Get-NetworkHostList
$list = $ips[(70..75)]
$c = 0
Foreach ($computer in $list)
[bool]$alive = $false
Write-Progress -Activity "Finding available hosts" -CurrentOperation "Testing" -Status $computer -PercentComplete (($c++/$list.count)*100)
cdhunt / Verbal Expressions
Created Jan 5, 2016
Messing around with CSharpVerbalExpressions and Fluent API in Powershell
View Verbal Expressions
Add-Type -Path C:\Temp\CSharpVerbalExpressions-master\VerbalExpressions\bin\Release\VerbalExpressions.dll
[psobject].Assembly.GetType("System.Management.Automation.TypeAccelerators")::add("verbex", "CSharpVerbalExpressions.VerbalExpressions")
[verbex]::new().StartOfLine().Then("http").Maybe("s").Then("://").Maybe("www.").AnythingBut(" ").EndOfLine().Test("")
$proto = [verbex]::new().StartOfLine().Then("http").Maybe("s").Then("://")
$Uri = $proto.AnythingBut(" ").EndOfLine()
cdhunt / output
Created Mar 1, 2016
Beating Hadoop with Posh
View output
Black White Tie RunTime
----- ----- --- -------
2853633 3762820 3260741 6 minutes, 45 seconds, 347 milliseconds
cdhunt / Markdown.types.ps1xml
Last active May 26, 2016
A custom type file to help generate markdown
View Markdown.types.ps1xml
<?xml version="1.0" encoding="utf-8" ?>
cdhunt / Help to MD
Created May 26, 2016
Use the Markdown.types.ps1xml to generate a help file in Markdown
View Help to MD
$help = Get-Help Get-Location
You can’t perform that action at this time.