Skip to content

Instantly share code, notes, and snippets.

View TomParfitt's full-sized avatar

Tom Parfitt TomParfitt

  • Parfitt Software Engineering Ltd.
View GitHub Profile
@TomParfitt
TomParfitt / .pre-commit-config.yaml
Created March 3, 2025 09:37
pre commit config yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
args: ['--allow-multiple-documents']
- id: check-json
- id: check-toml
- id: check-xml
- id: check-executables-have-shebangs
@TomParfitt
TomParfitt / random-password-generator.sh
Last active May 29, 2023 13:12
Generate random password
#!/bin/bash
# set -o xtrace
# README
# Generated a random password with words special characters and numbers.
# To change any of the settings see constants below.
#
# CONSTANTS
# ALL_NON_RANDOM_WORDS: path to file containing words (default: ./words.txt)

Keybase proof

I hereby claim:

  • I am tomparfitt on github.
  • I am tomparfitt (https://keybase.io/tomparfitt) on keybase.
  • I have a public key ASAg-6-qfrulQXb0Di-JiyHkH6HWEI3eXqVIOIE47kr-Fwo

To claim this, I am signing this object:

@TomParfitt
TomParfitt / exif.py
Created November 10, 2021 13:31
Preprocess google photos export so import to Apple photos includes exif data
import glob
import os
from pathlib import Path
def exists(path, parent_name, name):
glob_name = f"**/{parent_name}/{name}"
found_files = [f for f in glob.glob(path + glob_name, recursive=True)]
if len(found_files) == 1:
return found_files[0]
else:
@TomParfitt
TomParfitt / DebugProcessor.java
Last active November 2, 2021 13:58
Camel Debug Processor
import lombok.extern.slf4j.Slf4j;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class DebugProcessor implements Processor {
@Override