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
#requires -version 4.0 | |
Function Get-GitTip { | |
<# | |
.Synopsis | |
Get Git Tips | |
.Description | |
Use this command to search the tips file that is part of the Git-Tips project on GitHub. The default behavior is to get all tips but you can search for text in a tip title or select a random tip. | |
.Parameter Random |
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
#requires -version 4.0 | |
Function Find-GitTip { | |
<# | |
.Synopsis | |
Search Git tips | |
.Description | |
This function will search the Tips.json file from the Git-Tips project on GitHub. You will need to clone or download the git-tips project locally from https://github.com/git-tips/tips. | |
.Parameter Text |
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
Verifying that "jeffhicks.id" is my Blockstack ID. https://explorer.blockstack.org/name/jeffhicks.id |
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
#requires -version 4.0 | |
<# | |
Inspired from code originally published at: | |
https://github.com/Windos/powershell-depot/blob/master/livecoding.tv/StreamCountdown/StreamCountdown.psm1 | |
This should work in Windows PowerShell and PowerShell Core, although not in VS Code. | |
The ProgressStyle parameter is dynamic and only appears if you are running the command in a Windows console. | |
Even though are is no comment-based help or examples, if you run: help Start-PSCountdown -full you'll get the |
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
#get global index data for the Internet Traffic Report | |
$data = 'http://www.internettrafficreport.com/rawdata/itr-data.csv' | |
Invoke-WebRequest -Uri $data -OutFile $env:temp\itr.csv -DisableKeepAlive | |
Import-csv -Path $env:temp\itr.csv | Select-Object -First 1 | |
Remove-Item $env:temp\itr.csv |
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 Resolve-ShortLink { | |
[cmdletbinding()] | |
Param([string]$Url) | |
Add-Type -AssemblyName PresentationFramework | |
Add-Type –AssemblyName PresentationCore | |
Add-Type –AssemblyName WindowsBase | |
$form = New-Object System.Windows.Window | |
$stack = New-object System.Windows.Controls.StackPanel |
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
@charset "UTF-8"; | |
body { | |
font-family: "monospace"; | |
background-color: #ebebeb; | |
} | |
table { | |
border-collapse: collapse; | |
width: 80% | |
} |
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
$Path = "C:\work" | |
#get directory names. You could do this via remoting | |
$dirs = get-childitem -path $Path -Directory -Recurse | |
$paths = $dirs.fullname | |
$paths+= $Path | |
$data = @() | |
foreach ($item in $paths) { |
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
<# | |
display a colorful Christmas countdown prompt | |
[♫♪Christmas in 18.15:22:08֍♦] PS C:\> | |
This should work in the console with a True Type font and | |
the Powershell ISE | |
this prompt requires a TrueType font |
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
Param( | |
[string[]]$Computername = "chi-test02" | |
) | |
[DscLocalConfigurationManager()] | |
Configuration ResetLCM { | |
Param([string[]]$Computername) |