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
Write-Host "Extracting:" | |
$start = (Get-Date) | |
For ($i = 0; $i -lt $Args.Count; $i++) { | |
If (Test-Path -LiteralPath $Args[$i] -PathType Leaf) { | |
$name = (Get-Item -LiteralPath $Args[$i]).Name | |
$parent = (Get-Item -LiteralPath $Args[$i]).Directory.FullName | |
$current = ($i + 1).ToString().PadLeft($Args.Count.ToString().Length, "0") | |
Write-Host "[$($current)/$($Args.Count)] archive " -NoNewLine | |
Write-Host "$($name)" -ForegroundColor magenta | |
$archiveroot = (7z l "$($Args[$i])" -x!*\* | Select-Object -Last 1) |
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
Write-Host "Archiving:" | |
$start = (Get-Date) | |
For ($i = 0; $i -lt $Args.Count; $i++) { | |
$source = $Args[$i] | |
$type = "file" | |
If (Test-Path -LiteralPath $source -PathType Container) { | |
$source += "\\*" | |
$type = "folder" | |
} | |
$name = (Get-Item -LiteralPath $Args[$i]).Name |
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
$farpath = Get-Location | |
Write-Host "Script for update Far Manager" -ForegroundColor Blue | |
$others = @("changelog", "Far.exe.example.ini", "Addons", "Documentation", "Encyclopedia", | |
"PluginSDK", "SaveOldPluginSettings.cmd", "RestoreOldPluginSettings.cmd", | |
"*bel.hlf", "*bel.lng", "*cze.hlf", "*cze.lng", "*ger.hlf", "*ger.lng", "*hun.hlf", | |
"*hun.lng", "*ita.hlf", "*ita.lng", "*lit.hlf", "*lit.lng", "*pol.hlf", "*pol.lng", | |
"*sky.hlf", "*sky.lng", "*spa.hlf", "*spa.lng", "*ukr.hlf", "*ukr.lng") | |
$ver = (Test-Path -Path "File_id.diz") ? (Get-Content -Path "File_id.diz")[0] : "undefined" | |
Write-Host "Current version: " -NoNewLine | |
Write-Host $ver -ForegroundColor Magenta |
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
Add-Type -Path "$PSScriptRoot\SevenZipSharp.dll" | |
[SevenZip.SevenZipBase]::SetLibraryPath("$Env:UserProfile\Portable\Console\7z.dll") | |
$zipfile = New-Object SevenZip.SevenZipExtractor("$PSScriptRoot\armando_huerta.zip") | |
$temp = ($zipfile.ArchiveFileNames | Where-Object { -not $_.Contains("\") }) | |
$null = Register-ObjectEvent -InputObject $zipfile -EventName "Extracting" -SourceIdentifier "Extracting" -Action { | |
Write-Progress -Activity "armando_huerta.zip" -Status "Extracting" -PercentComplete $EventArgs.PercentDone | |
} | |
$null = Register-ObjectEvent -InputObject $zipfile -EventName "ExtractionFinished" -SourceIdentifier "ExtractionFinished" -Action { | |
Stop-Job -Name "Extracting" |
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
Clear-Host | |
$host.ui.RawUI.WindowTitle = "JPEG Optimizer" | |
[Console]::CursorVisible = $false | |
$Host.PrivateData.ProgressBackgroundColor = "Gray" | |
$Host.PrivateData.ProgressForegroundColor = "Black" | |
Class ResultItem { | |
[string]$Name | |
[string]$Files_processed | |
[string]$Size_MB |
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
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory, ValueFromPipeline, Position = 0)] | |
[ValidatePattern('\.wav$', ErrorMessage = "You should specify .wav files")] | |
[string[]]$Input, | |
[Parameter(Position = 1)][Alias('p')] | |
[uint]$Passes = 10 | |
) | |
process { | |
Class Result { |
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
# params | |
[CmdletBinding(DefaultParameterSetName="Casual")] | |
param ( | |
[Alias("c")] | |
[Parameter(ParameterSetName = "Pro", Mandatory = $true)] | |
[ValidateSet("stable", "beta", "dev", "canary")] | |
[string]$Channel, | |
[Alias("v")] | |
[Parameter(ParameterSetName = "Pro", Mandatory = $true)] | |
[ValidateNotNullOrEmpty()] |
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
param ( | |
[Parameter(Mandatory, ParameterSetName="folders")] | |
[string[]] $F, # folders by comma | |
[Parameter(Mandatory, ParameterSetName="listfile")] | |
[string] $L, # list with folders | |
[ValidateSet(1, 2, 3, 4)] | |
[int] $T = 2, # Number of files processed simultaneously | |
[ValidateSet(1, 2, 3, 4, 5, 6, 7, 8, 9)] | |
[int] $E = 7, # cjxl effort/speed | |
[string] $P = "", # cjxl parameters |
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
$downloadpath = "D:\Downloads" | |
$curversion = (Get-Content -Path "resources\app\package.json" | ConvertFrom-Json).version | |
$newversion = (Invoke-WebRequest -Uri "https://api.github.com/repos/microsoft/vscode/releases/latest" | ConvertFrom-Json).tag_name | |
Write-Host "Visual Studio Code - Updater" -ForegroundColor Cyan | |
Write-Host "Current version: " -NoNewLine | |
Write-Host $curversion -ForegroundColor Yellow | |
Write-Host "New version: " -NoNewLine | |
Write-Host $newversion -ForegroundColor Green | |
$choice = Read-Host -Prompt "Type 'y' or 'yes' to update current version" | |
If (-not ($choice.ToLower() -in @("y", "yes"))) { exit } |
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
$request_json = @" | |
{ | |
"request": { | |
"protocol": "3.1", | |
"dedup": "cr", | |
"ismachine": 1, | |
"hw": { | |
"physmemory": "16", | |
"sse3": "1", | |
"avx": "1" |
OlderNewer