Skip to content

Instantly share code, notes, and snippets.

View clr1107's full-sized avatar

Chris clr1107

View GitHub Profile
# Once I've cropped all my images, I rotate them to be the correct orientation manually
# but all this does is changes a tag in the exif metadata. So, Immich won't display the
# rotation.
#
# This script will apply that orientation manually and strip that metadata.
for f in `find cropped/* -type f -print`; do
f=$(echo $f | cut -d '/' -f2-)
echo "Doing $f..."
@clr1107
clr1107 / powerbtnd.c
Created September 1, 2022 11:59
Linux daemon listening to the power button and sending an alert.
#define _GNU_SOURCE
#include <stdlib.h>
#include <errno.h>
#include <linux/input.h>
#include <string.h>
#include <stdio.h>
#include <linux/limits.h>
#include <sys/stat.h>
#include <fcntl.h>
@clr1107
clr1107 / Example.txt
Created September 24, 2021 23:25
LaTeX script for quick recall sheets
(One)::
-- Line one
-- Line two
-- Some maths $4x^2$
;;
(Two)::
-- This is <b>Bold</b>
-- This is in <i>Italics</i>
;;