Skip to content

Instantly share code, notes, and snippets.

View eddiezato's full-sized avatar

eddie.zato eddiezato

  • Toha Heavy Industries
  • Tanelorn
View GitHub Profile
@eddiezato
eddiezato / taktest.ps1
Last active November 5, 2024 07:01
PowerShell: script to test takc 2.3.0 and 2.3.1
[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 {
@eddiezato
eddiezato / jpgopt.ps1
Last active November 5, 2024 07:01
PowerShell: script to optimize JPEG files with mozjpegtran
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
@eddiezato
eddiezato / updateFar.ps1
Last active November 5, 2024 06:59
PowerShell: script to update FAR Manager
function Select-Button {
param(
[string]$Prompt,
[string[]]$Buttons,
[uint]$Position
)
"$Prompt " | Write-Host -NoNewline -ForegroundColor Magenta
$cursor = $Host.UI.RawUI.CursorPosition
$Panel = {
$panel_ = ''