Skip to content

Instantly share code, notes, and snippets.

View MichaelHolley's full-sized avatar
:shipit:

Michael Holley MichaelHolley

:shipit:
View GitHub Profile
@MichaelHolley
MichaelHolley / nef_to_jpg.py
Created August 15, 2023 09:17
a python script to convert .nef files from a input directory to .jpg
import os
import rawpy
from PIL import Image
def convert_nef_to_jpg(input_dir, output_dir):
if not os.path.exists(output_dir):
os.makedirs(output_dir)
for filename in os.listdir(input_dir):
if filename.lower().endswith('.nef'):
@MichaelHolley
MichaelHolley / prepare-commit-msg
Last active May 3, 2024 05:58
git-hook to include the ticket-number in the commit-message for feature- and fix-branches. Requiring the syntax of "feature/187-my-branch".
#!/usr/bin/env python
import sys
import re
from subprocess import check_output
print("Starting commit message hook...")
supported_branch_types = ["fix", "feature"]
regex = '(?<=\/)[0-9]+'