Skip to content

Instantly share code, notes, and snippets.

View rail01's full-sized avatar
🦊
I just really like foxes, ok?

rail rail01

🦊
I just really like foxes, ok?
View GitHub Profile
@rail01
rail01 / rawRename.py
Last active October 3, 2024 13:51
Mass-rename RAW files in a folder to give them ISO 8601-ish timestamp names for easier identification, management and preventing duplicates
#!/usr/bin/env python3
# RAW Rename
#
# Goes through a list of files inside a directory and finds RAW files not matching desired naming scheme
# Then uses `exiftool` to change their names based on photo capture timestamp from file metadata
#
# e.g. original filename "DSC_0001.NEF" will be changed to "IMG_1970-01-01T12-00-00.NEF"
# Script only works with RAW file formats supported by `exiftool`: https://exiftool.org/#supported
#
# Having `exiftool` installed is necessary
@rail01
rail01 / Public_Polish_NTP_Servers.md
Last active November 14, 2024 20:21
List of publickly accessible NTP time servers in Poland

Below is the list of publickly accessible NTP time servers located in Poland, along with their hostnames, IP addresses, Stratum levels, AS numbers and contact information.

List consists of trustworthy sources such as government agencies, scientific organizations, ISPs or major infrastructure providers. STRATUM 1 and 2.

If you're looking to use any of those NTP servers in business-critical production environment, please consider obtaining time from a time source directly, e.g. via GPS receiver or caesium atomic clock.

List

Host organization Hostname(s) IPv4 IPv6 STRATUM ASN Contact information
Główny Urząd Miar (Central Office of Measures) tempus1.gum.gov.pl tempus2.gum.gov.pl 194.146.251.100 194.146.251.101 N/A 1 AS50606 [email protected]
@rail01
rail01 / nvidia-persistent-powermizer-mode.md
Last active October 22, 2024 05:11
Make Nvidia GPU performance mode settings permanent on Linux

As many may already know, proprietary nvidia drivers for Linux are far from being perfect, with many options limited or even not present at all. One different case is PowerMizer performance mode, which is present in Linux driver, but its value gets purged after every system reboot and returns back to "Auto".

Fix

In order to fix that it's necessary to create systemD unit that will enroll new setting every time the system is booted. To do that make sure first that your systemD user configuration directory does exist or create one:

$ cd ~/.config/systemd/user/

If instead you get an error saying that the directory does not exist, create it by typing:

$ mkdir -p ~/.config/systemd/user/