Skip to content

Instantly share code, notes, and snippets.

View erikvullings's full-sized avatar

Erik Vullings erikvullings

View GitHub Profile
@erikvullings
erikvullings / app.ts
Created November 3, 2024 11:56
Plugin for mithril-ui-form of the SearchSelect component
import { registerPlugin } from 'mithril-ui-form';
import { searchSelectPlugin } from './search-select-plugin';
// Register plugin under the name `search_select` or any other name of your choosing.
registerPlugin('search_select', searchSelectPlugin);
@erikvullings
erikvullings / README.md
Created September 4, 2023 08:53
Sort photos by EXIF date taken in a folder structure (WINDOWS).

Introduction

My camera photos on my phone all end up in one big folder. I wanted to sort them by date taken in a simple format year-month format, YYYY-MM. I tried the application PhotoMove, but unfortunately, this simple requirement is only available with the PRO version, so instead, I've asked ChatGPT to create a PowerShell script for me.

Usage:

  1. Download the Windows version from exif tool and unzip it into a folder. Make sure that the name is exiftool.exe (in my case, it had a weird name exiftool(-k).exe so rename it if that's the case).
  2. Save the PowerShell script you can find below in the same folder.
  3. Open a PowerShell window (WIN+R and enter powershell)
  4. Run the script ./sort.ps1
@erikvullings
erikvullings / .env
Created September 1, 2023 15:43
Docker setup with Traefik as a reverse proxy + let's encrypt certificates, keycloak + postgres as identity provider, and a simple service that is protected by it
POSTGRESQL_PASSWORD="PASSWORD"
POSTGRESQL_POSTGRES_PASSWORD="PASSWORD"
KEYCLOAK_ADMIN_PWD="PASSWORD"
HOST="LOCALHOST"
EMAIL="YOUR.EMAIL"
@erikvullings
erikvullings / Docker-compose.yml
Created May 22, 2023 09:40
Traefik reverse proxy settings in Docker (swarm), including strip path prefix
---
version: "3.3"
networks:
icem-net:
driver: overlay
attachable: true
services:
reverse-proxy:
@erikvullings
erikvullings / README.md
Last active May 19, 2023 16:31
Create a new Docker volume and fill it with local data

Create Docker volume

When moving from a local development environment to the cloud, e.g. Docker swarm or Kubernetes, you often need a way to access local files. However, in the cloud your local file system cannot be accessed anymore, so you need a way to copy your local files to a volume and mount that instead. This is the purpose of the script. You supply it with the volume name (e.g. schemas) and the local folder containing the schemas, e.g. ../../schemas, and a schemas volume is created, containing all data that is copied into the container.

./create_volume.sh schemas ../../schemas