Skip to content

Instantly share code, notes, and snippets.

View chrisgilbert's full-sized avatar

Chris Gilbert chrisgilbert

View GitHub Profile
@chrisgilbert
chrisgilbert / config
Last active May 5, 2022 14:10 — forked from jonnyyu/config
# add to ~/.aws/config and add the path to your folder.
[serverless-deployments-dev]
role_arn = arn:aws:iam::ACCOUNT_ID:role/ROLE-NAME
role_session_name = SESSION_NAME
region = eu-west-2
before_compile:
- echo "Before compile"
stage_name_constructor: >
node seed/sanitise-branch.js "$SEED_STAGE_BRANCH" 2>/dev/null
if [[ $? -ne 0 ]]; then
echo "test-branch"
fi
@chrisgilbert
chrisgilbert / Dockerfile
Last active April 10, 2024 18:55
nextcloud-ffpmeg
FROM nextcloud:apache
ENV PHP_UPLOAD_LIMIT 10G
RUN apt-get update && apt-get install -y \
imagemagick-common \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
@chrisgilbert
chrisgilbert / gist:755a8e033cd7a072ed6f0c3abd757976
Last active August 5, 2023 12:46
Copy Apple XMP subject info to original file
# See https://exiftool.org/forum/index.php?topic=13167.msg71166#msg71166
# Also https://raw.githubusercontent.com/exiftool/exiftool/master/arg_files/xmp2exif.args
# Fix info including GPS
exiftool -overwrite_original_in_place -r -wm cg -ext mov -api QuickTimeUTC=1 -tagsFromFile %d%f.xmp '-AllDates<XMP-photoshop:DateCreated' '-Track*Date<XMP-photoshop:DateCreated' '-Media*Date<XMP-photoshop:DateCreated' '-Keys:CreationDate<XMP-photoshop:DateCreated' '-Keys:GPSCoordinates<$XMP:GPSLatitude# $XMP:GPSLatitudeRef, $XMP:GPSLongitude# $XMP:GPSLongitudeRef' '-Keys:DisplayName<XMP-dc:Title' '-Keys:Description<XMP-dc:Description' '-Keys:Keywords<XMP-dc:Subject' '-FileCreateDate<XMP-photoshop:DateCreated' '-FileModifyDate<XMP-photoshop:DateCreated' .
# Just import additional descriptions and keywords to original, don't replace any existing tag
# also change file modification and creation dates to dates of xmp data
exiftool -overwrite_original_in_place -wm cg -ext jpg -ext heic -tagsFromFile %d%f.xmp '-Keys:DisplayName