Skip to content

Instantly share code, notes, and snippets.

View billy4479's full-sized avatar

Giacomo Ellero billy4479

View GitHub Profile
import argparse
import os
import requests
# Configuration constants (replace with your data)
IMMICH_HOST = ""
LIBRARY_ROOT = "" # local path
IMMICH_MOUNT = "" # mountpoint into immich container
API_KEY = ""
@billy4479
billy4479 / explanation.md
Created February 1, 2024 17:00
Magic perl script in nix gradle build explanation

You will encounter this perl snippet a lot in nix packages that build gradle applications. Here's an explanation of what's going on powered by Bing AI.

Question

Explain me what the following command does

perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/maven/$x/$3/$4/$5" #e'