Proxy Information
Original URL
gemini://g.mikf.pl/fragmlog/2023-04-01-powershell--files/after_changes.ps1
Status Code
Success (20)
Meta
text/gemini param ( [Parameter(Position = 0)] [ScriptBlock]$ScriptBlock = { } ) $TheContentJob = & { $TempFile = New-TemporaryFile Write-Information "Temporary file name '$TempFile'. " -InformationAction Continue & { Import-Module ` "C:\Users\Mika Feiler\$( )\source\repos\DotnetTarGzipper\$( )\bin\Release\net7.0\DotnetTarGzipper.dll" $GemCap = $env:GemCap Push-Location Set-Location $GemCap & 'C:\Program Files\Git\bin\bash.exe' ` -c 'date -d "$(grep "^## " tinylog.gmi | cut -c 4- | head -1)" \ +"# Mika Feiler%n=> tinylog.gmi %F Tinylog" > gemfeed-tinylog.gmi' Pop-Location Get-ChildItem $GemCap -File -Recurse -Name | Where-Object { $_ -NotMatch "^(.*[\\\/])?\..*" } | ForEach-Object { $_ -replace '\\', '/' } | New-Tar (Resolve-Path $GemCap) | Compress-Gzip | Set-Content -Path $TempFile -AsByteStream Write-Information "Finished creating archive. " -InformationAction Continue } 1>$null return $TempFile } & & ScriptBlock & function Get-SrHtToken { $SrHtTokenKey = "SrHtToken_g.mikf.pl" $SrHtToken = Get-Secret $SrHtTokenKey -ErrorVariable NoSrhtToken if($NoSrhtToken.Exception -Is ` [System.Management.Automation.ItemNotFoundException]) { Set-Secret $SrHtTokenKey ($SrHtToken = ` Read-Host -AsSecureString -Prompt "Enter the token") } $SrHtToken } $TempFile = Get-ChildItem -Path (Wait-Job $TheContentJob | Receive-Job) Invoke-WebRequest -Method Post ` -Uri "https://pages.sr.ht/publish/g.mikf.pl" ` -Authentication OAuth -Token (Get-SrHtToken) ` -Form @{ protocol = "GEMINI" content = $TempFile } ` -RetryIntervalSec 2 -MaximumRetryCount 3 | ForEach-Object { Write-Host $_.RawContent } Remove-Job $TheContentJob Write-Information -InformationAction Continue "Actual:" Get-FileHash -Algorithm SHA256 $TempFile | foreach-object { Write-Host $_.Hash.ToLower() }
Capsule Response Time
137.229029 milliseconds
Gemini-to-HTML Time
0.010053 milliseconds

This content has been proxied by September (ba2dc).