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 Foo { | |
@(1..2) | ForEach-Object -Parallel { | |
switch ($_) { | |
1 { | |
Return 1 | |
} | |
2 { | |
# This could be something that takes a while | |
# like a network call, etc | |
Start-Sleep 3 |
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
Class JsonBin { | |
[string]$BinID | |
[string]$SecretKey = '$xyz' | |
[object]$Data | |
JsonBin($binID){ | |
$this.BinID = $binID | |
$this.Get() | |
} | |
Get(){ | |
$res = Invoke-RestMethod -Method Get -Uri "https://api.jsonbin.io/b/$($this.BinID)/latest" -Headers @{'secret-key'=$this.SecretKey} |
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
from PIL import Image | |
import multiprocessing as mp | |
import os, math, sys | |
folder = "C:/Users/jh/AppData/Roaming/Factorio/script-output/FactorioMaps/" + sys.argv[1] + '/Images/' | |
ext = ".jpg" | |
maxthreads = mp.cpu_count() | |
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
<# | |
.SYNOPSIS | |
Backs up Factorio save / autosaves | |
.PARAMETER SaveName | |
The name of the save file (excluding the .zip extension) | |
.PARAMETER Auto | |
Auto backup new saves as you're playing | |
.PARAMETER SavesPath | |
Path to Factorio save files. |
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
[JhaContentDB]::new($dbPath).Load().Add($item).Save().Close() |
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
@( | |
'Microsoft.Messaging' | |
'Minecraft' | |
'Netflix' | |
'Microsoft.MicrosoftOfficeHub' | |
'Microsoft.OneConnect' | |
'Microsoft.Office.OneNote' | |
'Microsoft.People' | |
'Microsoft.WindowsPhone' | |
'Microsoft.Windows.Photos' |
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
$auPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\{8FA01A01-4B9C-4A5F-9E4B-5242B1CA676A}Machine\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" | |
New-Item $auPath -Force | |
Set-ItemProperty -Path $auPath -Name NoAutoRebootWithLoggedOnUsers -Type DWord -Value 1 -Force |
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 Send-PasswordHashesToDiscord { | |
<# | |
.SYNOPSIS | |
Sends password hashes from dump to Discord | |
#> | |
Param ( | |
[string]$LastHash, | |
[switch]$FirstRun | |
) | |
$path = 'V:\NOBACKUP\TMP\pwned-passwords-1.0.txt' |
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
0eNrt3U/T3baZpvHvorXVxRskQDK7Xsx2Nt2LqZpKuWTn7UTVsuxSlEwyXfruI1l/LEuHPPgdnLeSrvEqFfvlY/AABC4+eIjrv5589+IvDz+9ev7y9bff/fjjfz753X/98k/+/OR3//uz//vu3z3//seX7//xn5//8eWzF+/+2eu///Tw5HdPnr9++OHJN09ePvvh3f979ez5iydvvnny/OUfHv725Hd5882FS/76/NXrv7z9J5+uev8XT5fPrix0ZfnsyvnN77958vDy9fPXzx/et/nn//P3b1/+5YfvHl69bdQvV79+294//un105+b/c2Tn37889urfnz57r/4NtLTLN88+fu7/53ehv/D81cP37//tz837ouopT9q6Y8690ed+qMu3VG3/qC1O2jrD9q6g0JXrd1Boae2T0G//8urvz784SDk/D7i/uuA84WA+68eqqcfnoVLg/Rf6vug27/UX4dtF8K+Gyc9Dd3fx/wi4nopoj9Qy/XfM/5A9UT1B6onKj9QPUH5geoJyg9UT1B+oHqCbr1BoZ/23pj97SxTb8z+H7R0P1H9PV+6n6f+IVq6nyZ4mEr3wwTPfel+mGCKKo2n6NIzRZdfnqfvnv/x6cOLt3/86vn3T3/68cXDGaW8uRRr62tjZmviLk08beE89f6KH5s4fdnCi+SUzhtfKGrRta50BJ11qesJuuhK1xO04kLXE7PhOtcTc8VlrifmhqtcT8zdFrmOkMtka1xPyNgS1xOyCIXO1yekZbYls6eNi62YPSErLpg9MRuulz0xV1wue2LSG9LaEXDXhaP1TPF10il+6wganeJ7ghad4nuCzjjF98RccIrviVlxiu+J2XCK/yrm7795nxD73Wf5s2+evHj23cOLD8P024+Rv12+LW//3V8fXv35/ay2LKWmLds0/5LMmt61sjcVd5Qd+183Z+TKrzJy98urfQD3Ut6cZtKuPNbTJ2TNlw/2cppL66Hq/ayJS2cT108tfEfV90iaXW5P859+ejOUGWt |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
function getCookie(name) { | |
var matches = document.cookie.match(new RegExp( | |
"(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)" | |
)); | |
return matches ? decodeURIComponent(matches[1]) : undefined; | |
} |