Skip to content

Instantly share code, notes, and snippets.

View panekj's full-sized avatar
:shipit:
mentally offline

Jakub Panek panekj

:shipit:
mentally offline
View GitHub Profile

$argon2id$v=19$m=512,t=256,p=1$MkpJSmXaiYhJ+RCgz9omFA$NGNqyxBNy7IxYwvVjfkqhSucTP1hTFyxo9oidigPBU0

@panekj
panekj / alpine.patch
Created July 31, 2021 21:15
Patch for PowerShell/PowerShell build module to allow cross compile to arm/arm64 Alpine
diff --git a/build.psm1 b/build.psm1
index 6028c5fdc..531116d47 100644
--- a/build.psm1
+++ b/build.psm1
@@ -298,6 +298,8 @@ function Start-PSBuild {
# We do not use ValidateScript since we want tab completion
# If this parameter is not provided it will get determined automatically.
[ValidateSet("alpine-x64",
+ "alpine-arm",
+ "alpine-arm64",
#!/bin/sh
export PS_VERSION=$1
export PS_PACKAGE=powershell-${PS_VERSION}-linux-alpine-x64.tar.gz
export PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
export PS_INSTALL_VERSION=$PS_VERSION
cd /tmp/
wget ${PS_PACKAGE_URL}
export PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION
mkdir -p ${PS_INSTALL_FOLDER}
tar zxf /tmp/${PS_PACKAGE} -C ${PS_INSTALL_FOLDER} -v
BEGIN MESSAGE.
WX6Cd4B52vicwKl K7wA3f7UADHqJqp tNNk6zJmOtUC03y nQtqaFprUU0xgiL
Mu2WklrrOfNUlkc PTlJLBWBIqXTCKq 6Xr2MZHgg6tG8ds Wwte5XD5xPU8guE
aowbphTgRPBXw5M mRLlz9bCIdWWCwn MgPWrR3ksd8sXpo I3qjtEwO2jjMwf4
FBVXQJhnbc29VCH vjFsKDUHoKaH7Uc k2HeU21.
END MESSAGE.
asnp Citrix*
while($true){ `
Get-BrokerSession -SessionState Disconnected -AdminAddress hostname | ForEach-Object -Process { `
$time = ( ( Get-Date ) - ( $_.SessionStateChangeTime ) ).Hours ; if ( $time -gt 6 -and $_.UserName -ne "domain\user") { `
$_ | Stop-BrokerSession ; $_.UserName | Out-File -FilePath "C:\Windows\temp\licence.log" -Append `
} `
} ; Start-Sleep -Seconds 1800 `
}
// SSPR Button Start
function ssprButton() {
$("a#loginBtn").ready(function(){
$('a#loginBtn').after('<br><a id="ssprBtn" href="https://passwordreset.microsoftonline.com/?whr=domain.tld" target="_blank" class="button forms-authentication-button last-child default">Password Reset</a>');
});
setTimeout(function(){
if(document.getElementById('ssprBtn') != null){
clearInterval(timer);
}
}, 500);