Skip to content

Instantly share code, notes, and snippets.

@schtritoff
schtritoff / Get-InvoicesFromSolo.ps1
Created June 17, 2020 14:48
Download all invoices in JSON and PDF from web app SOLO.com.hr https://solo.com.hr/api-dokumentacija
<#
.SYNOPSIS
Download all invoices from SOLO.COM.HR API
#>
[CmdletBinding()]
param (
[Parameter(Mandatory=$True)]
[string]$Token,
[switch]$RefreshInvoicesList,
<#
.SYNOPSIS
Use this script to fix AVI Xvid or DivX files to be playable on newer Samsung TV's
Do not run this script from Powershell ISE, only run from Powershell terminal window or Windows Terminal
Prerequisite: ffmpeg.exe in global path
#>
# if you want to backup files first before processing set this variable value to $true
[bool] $EnableBackup = $false
@schtritoff
schtritoff / Convert-PySceneDetectCSV.ps1
Created May 16, 2023 19:17
Convert PySceneDetectCSV
<#
.SYNOPSIS
Convert PySceneDetect output CSV file to something that can be embedded in MKV or MP4
.EXAMPLE
Frst create scenes file using PySceneDetect
"%~dp0tools\software\PySceneDetect\scenedetect.exe" -i "%input%" -s "%output_dir%\my_video.stats.csv" --min-scene-len 1s --merge-last-scene list-scenes -s -o "%output_dir%" detect-adaptive --threshold 7 --frame-window 100 save-images -o "%output_dir%" export-html
Then convert CSV to file format supported by ffmpeg or mp4box
for ffmpeg:
powershell.exe -NonInteractive -ExecutionPolicy ByPass -File "%~dp0Convert-PySceneDetectCSV.ps1" -InputFile "%~dp0output_scenedetect\%filename%-Scenes.csv" -OutputFile "%~dp0output_scenedetect\%filename%-Scenes.ffmetadata.txt" -OutputType "ffmetadata"
@schtritoff
schtritoff / Install-MavenUserInstall.ps1
Created July 20, 2023 22:56
Apache Maven - unattended Windows installation (non-admin, no UAC, in user apps folder)
<#
.SYNOPSIS
Install Apache Maven as user installation (no admin rights requred)
.EXAMPLE
PS C:\> .\Install-MavenUserInstall.ps1
CMD C:\> powershell.exe -ExecutionPolicy ByPass -File Install-MavenUserInstall.ps1
.NOTES
References:
- https://gist.github.com/FlorianLatapie/3c3125a2a371dc08991313401f04db65