Skip to content

Instantly share code, notes, and snippets.

View brkerez's full-sized avatar

Pavel Trka brkerez

  • Czech Republic
View GitHub Profile
@brkerez
brkerez / upgrade-notepad4.ps1
Last active October 8, 2025 14:44
Installs or upgrades Notepad4 via winget. If upgrade is detected, it prevents winget from rewriting its existing configuration. It also preserves the incoming configuration files that come with new version and if -Merge parameter is specified, it tries to locate some merging tool and launches it to allow user manually merge incoming upstream cha…
<#
.SYNOPSIS
Installs or upgrades Notepad4 via winget.
If upgrade is detected, it prevents winget from rewriting its existing configuration.
It also preserves the incoming configuration files that come with new version and if
-Merge parameter is specified, it tries to locate some merging tool and launches it to
allow user manually merge incoming upstream changes.
@brkerez
brkerez / set-dng-exif-anamorphic-ratio.ps1
Created December 2, 2024 11:03
PowerShell script that sets chosen anamorphic ratio for DNGs in current directory via exiftool
<#
.SYNOPSIS
Sets anamorphic ratio for squeezed DNGs in current directory so they then can be imported into Lightroom properly desqueezed (Lightroom will pick-up the ratio stored in DNG upon import)
.DESCRIPTION
Sets anamorphic ratio metadata for all DNG files in the current directory.
Such images can then be then imported to Lightroom which will display them properly based on exif ratio information as
Lightroom currently does not have any way to set anamorphic ratio for multiple images and every image has to be opened
in Photoshop to do that which is extremely painful
@brkerez
brkerez / convert-raw-to-dng.ps1
Last active December 2, 2024 11:04
Script for conversion of RAW photos in current directory (various camera formats via dnglab) to DNG
<#
.SYNOPSIS
Converts various RAW format files to DNG format using `dnglab` https://github.com/dnglab/dnglab (see the homepage for supported RAW formats)
.DESCRIPTION
Converts RAW files in the current directory to DNG format. Uses dnglab for conversion
as it's more reliable than Adobe DNG Converter, especially for Canon R5C CR3 files.
Works cross-platform on both case-sensitive and case-insensitive file systems.
.PARAMETER OutputDir
@brkerez
brkerez / 0_reuse_code.js
Created July 13, 2017 13:44
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console