If you have your photos correctly sorted in a way:
*/2007-01-01/*.jpg
that script can loop through all and check if the exif DateTimeOriginal matches with the folder.
# https://gist.github.com/amit/45e750edde94b70431f5d42caadee423 | |
namespace :db do | |
DEFAULT_BACKUP_DIR = "#{Rails.root}/tmp/backups" | |
BACKUP_DIR = ENV['DB_BACKUP_DIR'].presence || DEFAULT_BACKUP_DIR | |
KEEP = ENV['DB_BACKUP_KEEP'].present? ? ENV['DB_BACKUP_KEEP'].to_i : 7 | |
desc "Dumps the database to backups" | |
task dump: :environment do | |
cmd = nil | |
with_config do |_app, host, db, user, passw, port| |
# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files. | |
# Ignore git directory. | |
/.git/ | |
# Ignore bundler config. | |
/.bundle | |
# Ignore all default key files. | |
/config/master.key |
# copy script content into ` sudo gitlab-rails console `: | |
# Gitlab FOSS does only give you the option to Prioritize Labels per project, and only On/Off, no value. | |
# IT is tiresome to iterate each project and set prioritzed labels, but in the database you can just set an arbitrary Priority Value | |
# Priority order: Lowest First. | |
should_be = { | |
"prio:0" => 5, | |
"type:bug" => 6, | |
"prio:1" => 8, | |
"prio:2" => 9, |
See my blog for more information.
Content:
#!/usr/bin/env ruby | |
require 'json' | |
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
# gem 'pry' | |
# gem 'toml' | |
gem 'typhoeus' | |
end |
lp
under the hoodSend Mail as a authorized return-path (via regex matching) to your mailbox, it will print all pdf Attachments.
require 'bundler/inline' | |
# TODO: Skip Auto udpate when not on master or main branch | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'bundler-audit', "~> 0.9" | |
gem 'pry' | |
gem 'tty-prompt' | |
end |
<template lang="pug"> | |
.pdf-page--wrapper(:class='{"text-selection": textSelectionEnabled }') | |
.row.mr-3 | |
.col-sm-3 | |
.col-sm-6.pdf-page--headline {{$t('js.attachment_viewer.page', { page: page })}} | |
.col-sm-3 | |
.pdf-page--buttons | |
.btn-group.mr-1(v-if="printable") | |
button.btn.btn-secondary.btn-sm(type="button" @click="print" data-toggle="tooltip" data-placement="top" :title="$t('js.attachment_viewer.print')") | |
i.mdi.mdi-printer.mdi-fw |
FROM ruby:2.7.1-alpine | |
ENV BUNDLER_VERSION=2.0.2 | |
RUN apk add --update --no-cache \ | |
binutils-gold \ | |
build-base \ | |
curl \ | |
file \ | |
g++ \ |