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
| $template = @' | |
| {[DateTime]Date*:Tue Nov 11, 2014} {Home:Penguins}{Away:Rangers} {[DateTime]Time:7:00 PM} FINAL PIT (0) - NYR (5) Recap | |
| {Date*:Sat Mar 14, 2015} {Home:Bruins}{Away:Penguins} 1:00 PM ROOT, NHLN-US, TVA Tickets BUY/SELL | |
| Thu Mar 26, 2015 PenguinsHurricanes 7:00 PM ROOT | |
| Sat Nov 22, 2014 PenguinsIslanders 7:00 PM ROOT, CITY | |
| Sat Nov 1, 2014 SabresPenguins 7:00 PM FINAL BUF (0) - PIT (5) Recap | |
| Fri Jan 16, 2015 PenguinsIslanders 7:00 PM ROOT, TVA2 | |
| '@ | |
| (Invoke-WebRequest http://penguins.nhl.com/club/schedule.htm).AllElements | |
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
| class GeometryNumber { | |
| [double]$Number | |
| GeometryNumber() {} | |
| GeometryNumber($Number) { $this.Number=$Number } | |
| [GeometryNumber] Sqrt() { return [GeometryNumber]::new([Math]::Sqrt($this.Number)) } | |
| [GeometryNumber] Reciprocal() { return [GeometryNumber]::new(1/$this.Number) } | |
| [GeometryNumber] TangetAngle() { return [GeometryNumber]::new([System.Math]::Atan($this.Number)) } | |
| [GeometryNumber] AsDegrees() { return [GeometryNumber]::new($this.Number*180/[Math]::PI) } |
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
| 1..10 | ForEach { | |
| $r = 0..($_-1) -join '' | |
| $exp = "$($r)*9+$_" | |
| "{0,15}={1}" -f $exp, ($exp|Invoke-Expression) | |
| } | |
| '' |
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
| param($Rows=8, $Columns=8) | |
| Add-Type -AssemblyName System.Drawing | |
| class Cell { | |
| [int]$Row | |
| [int]$Col | |
| $links = @{} |
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
| $startDate = (Get-Date).ToString('Mddyy') # 51515 | |
| $ca=$startDate.ToCharArray() | |
| [array]::Reverse($ca) | |
| $ofs='' | |
| $startDate -eq "$ca" # prints True |
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 cal { | |
| param( | |
| [string[]]$TargetMonth=(Get-Date).ToString('MMM'), | |
| $Year=(Get-Date).year | |
| ) | |
| foreach ($month in $TargetMonth) { | |
| $q = "$month $year calendar" |
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
| Configuration DotNetFrameWork{ | |
| param($TargetMachine) | |
| Node $TargetMachine { | |
| WindowsFeature NET-Framework-Features { | |
| Ensure = 'Present' | |
| Name = "NET-Framework-Features" | |
| } | |
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 MoonRiseLCT(DY As Double, MN As Double, YR As Double, DS As Double, ZC As Double, GLong As Double, GLat As Double) As Double | |
| Dim K As Integer | |
| GDY = LctGDay(12, 0, 0, DS, ZC, DY, MN, YR) | |
| GMN = LctGMonth(12, 0, 0, DS, ZC, DY, MN, YR) | |
| GYR = LctGYear(12, 0, 0, DS, ZC, DY, MN, YR) | |
| LCT = 12#: DY1 = DY: MN1 = MN: YR1 = YR | |
| GoSub 6700: LA = LU | |
| For K = 1 To 8 |
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
| ## | |
| ## Thanks to Jum Truher on the PowerShell team https://jtruher3.wordpress.com/ | |
| ## | |
| $scriptRoot = Split-Path $MyInvocation.MyCommand.Path | |
| . "$scriptRoot\RubyArraylistConstructs.ps1" | |
| Describe "Ruby array constructs are available on an ArrayList" { | |
| BeforeEach { |
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
| ## | |
| ## Thanks to Jum Truher on the PowerShell team https://jtruher3.wordpress.com/ | |
| ## | |
| Update-TypeData -Force -TypeName System.Collections.ArrayList -MemberType ScriptMethod -MemberName Push -Value { | |
| foreach($v in $args) { | |
| [void]$this.Add($v) | |
| } | |
| } |
OlderNewer