Skip to content

Instantly share code, notes, and snippets.

@ljm42
ljm42 / PhotoImport.sh
Last active February 1, 2025 21:42
unRAID - automatically move photos to array
#!/bin/bash
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
## Usage (after configuration):
## 1. Insert camera's memory card into a USB port on your unRAID system
## 2. The system will automatically move (or copy) any images/videos from the memory card to the array
## If jhead was installed, it will automatically rotate images according to the exif data
## 3. Wait for the imperial theme to play, then remove the memory card
## Preparation:
@laacz
laacz / lks-92.php
Last active June 3, 2025 09:46
LKS-92 koordināšu pārrēķins uz platuma un garuma grādiem.
<?php
// Ja šis nedod korektu rezultātu Y asī, atkomentē rindiņu, kur ir "$y -= -6000000.0;"
function LKSToLatLon($x, $y)
{
/* Ellipsoid model constants (actual values here are for WGS84) */
$UTMScaleFactor = 0.9996;
$sm_a = 6378137.0;
$sm_b = 6356752.314;