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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<html> | |
<title>SANKEY Experiment</title> | |
<style> | |
.node rect { | |
cursor: move; | |
fill-opacity: .9; | |
shape-rendering: crispEdges; |
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
http://www.powershellmagazine.com/2014/07/03/posh-ssh-open-source-ssh-powershell-module/ | |
http://powershell.com/cs/media/p/203.aspx | |
https://blogs.technet.microsoft.com/heyscriptingguy/2011/11/11/use-powershell-to-easily-convert-decimal-to-binary-and-back/ | |
http://stackoverflow.com/questions/34339258/fast-converting-decimal-to-binary-numbers-powershell | |
https://technet.microsoft.com/en-us/library/ee692684.aspx | |
http://mohundro.com/blog/2011/05/31/fun-with-binary/ | |
http://haacked.com/archive/2012/01/30/hazards-of-converting-binary-data-to-a-string.aspx/ | |
http://geekswithblogs.net/dbrown/archive/2009/04/05/convert-a-bitarray-to-byte-in-c.aspx | |
http://www.remkoweijnen.nl/blog/2012/05/10/bit-shifting-in-powershell/ | |
https://www.experts-exchange.com/questions/23517251/How-to-save-a-C-BitArray-using-SQL-Server.html |
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
$n="`n" | |
$l = @{ | |
C=@({"I get knocked down,$((&$l.A)[0])ut I get up again$((&$l.A)[1])"},{"You are never gonna keep me down"}) | |
V={"$(((("Whiskey","Vodka"),("Lager","Cider") | %{($_ | %{"He drinks a $_ drink"}) -join ", "}),(("good","best") | %{"He sings the songs that remind him of the $_ times"}) | %{$_}) -join $n)`n($(switch ($_) {2 {"Oh Danny Boy, Danny Boy, Danny Boy"}; 4 {"Don't cry for me, next door neighbor"}}))"} | |
A={if($lp -le 5){@(" b","")}else{@(" (we'll be singing)`nB","$(if($lp -gt 9){" (pissing the night away)"})")}} | |
} | |
$out = 1..20 | %{ | |
$lp = $_ | |
if ($_ -le 5){ |
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
$packages = @( | |
"notepadplusplus.install", | |
"7zip.install", | |
"GoogleChrome", | |
"Firefox", | |
"AdobeReader", | |
"Putty.install" | |
) | |
Install-Package -Name Chocolatey -Force -ProviderName chocolatey | |
$chocopath = (Get-Package chocolatey | ?{$_.Name -eq "chocolatey"} | Select @{N="Source";E={((($a=($_.Source -split "\\"))[0..($a.length - 2)]) -join "\"),"Tools\chocolateyInstall" -join "\"}} | Select -ExpandProperty Source) |
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 Invoke-ExampleSlackBot { | |
[cmdletbinding()] | |
Param( | |
[Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)] | |
[ValidateNotNullOrEmpty()] | |
[string]$BotName, | |
[Parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true)] | |
[ValidateNotNullOrEmpty()] | |
[securestring]$Token = $(Read-Host -Prompt "API Key" -AsSecureString) | |
) |
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
$Targets = Get-ADComputer -Filter '*' -SearchBase (Get-ADOrganizationalUnit -filter {Name -like "*GroupNameHere*"} |select -expand DistinguishedName) | Select -ExpandProperty Name | |
$Results = Get-WmiObject win32_logicaldisk -ComputerName $Targets | |
$UniqueResults = $Results | select -ExpandProperty __SERVER -Unique | |
$NonResponsive = $Targets |?{$_ -notin $UniqueResults} |
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 Out-Window { | |
Param( | |
[Parameter(Mandatory=$true,ValueFromPipeline=$true)] | |
$InputObject | |
) | |
$OutputSettings = @{ | |
Multiline = $true | |
WordWrap = $false | |
ScrollBars = "Both" |
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
@{ | |
'HKLM:\SOFTWARE\Classes\AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723'=@{ | |
'NoOpenWith'=@{ | |
Val='' | |
Type='String' | |
} | |
'NoStaticDefaultVerb'=@{ | |
Val='' | |
Type='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
[McCain] | |
In the case of uh... Hillary Clinton, you made the statement that there wasn't uh... sufficient evidence to bring a suit against her although it'd been very uh, careless in their behavior but you did reach a conclusion in that case that it was not necessary to further pursue her. Yet at the same time in the case of Mr. Comey you said that there was not…not enough evidence to make a conclusion. Tell me the difference between your conclusion as far as former Secretary Clinton is concerned and...and Mr. Trump. | |
[Comey] | |
The Clinton investigation was a completed investigation that the FBI had been deeply involved in so I had the opportunity to understand all the facts and apply those facts against the laws as I understood them. This investigation was underway [shrugs] still going when I was fired so it's nowhere near in the same place, least it wasn't when I was- | |
[McCain] | |
[interrupting] But it's still ongoing. |
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 Compress-ListedFiles { | |
Param( | |
[Parameter(Mandatory=$True,Position=1)] | |
[array]$FileNames, | |
[Parameter(Mandatory=$True,Position=2)] | |
[string]$OutputPath | |
) | |
if($FileNames.Count -ne 0) { | |
#[string]$Zip = "$env:ProgramFiles\7-Zip\7z.exe" | |
[string]$Zip = "C:\Program Files\7-Zip\7z.exe" |
OlderNewer