Skip to content

Instantly share code, notes, and snippets.

View Daij-Djan's full-sized avatar

Dominik Pich Daij-Djan

View GitHub Profile
@Daij-Djan
Daij-Djan / dropbox-backup.sh
Created September 1, 2026 15:58
dropbox-backup.sh - script to backup dropbox via rclone
#!/usr/bin/env bash
set -euo pipefail
# โ”€โ”€ dropbox-backup โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
# Ad-hoc, on-demand backup of the ENTIRE Dropbox account to the LaCie drive.
#
# Pulls straight from the Dropbox cloud over the API via rclone. It does NOT
# read, touch, or depend on the local Dropbox sync folder
# (~/Library/CloudStorage/Dropbox), so it can't disturb normal Dropbox sync,
# and it also captures the ~4k files that are currently "online only".
@Daij-Djan
Daij-Djan / make_contact_sheets.sh
Created August 16, 2026 02:37
make a photosheet for photos in folder
#!/bin/bash
# Usage: make_contact_sheets.sh <source_dir> <dest_dir>
# Builds numbered contact-sheet grids (chronological, labeled by filename) for one event.
set -e
SRC="$1"
DEST="$2"
CHUNK=24 # photos per sheet
TILE="6x4"
THUMB="240x240"
#!/bin/bash
# Dropbox โ†’ Nextcloud import script for <<USER>>
# -----------------------------------------------
set -euo pipefail
BASE_DIR="/home/roesrathkleineichen/domains/<<DESTINATION>>"
RCLONE="/usr/bin/rclone"
PHP="/usr/bin/php"
cd "$BASE_DIR" || { echo "โŒ Failed to cd to $BASE_DIR"; exit 1; }
@Daij-Djan
Daij-Djan / button_mash_ps5.gph
Created December 10, 2021 22:28
Button mash for PS5:: Holding down square, cross, circle or triangale button for automatic repetition instead of press (fast button mash), On / Off: Press create button : to disabled/enable AutoCombo. (rumbles on activate), Hold create button 1s for normal options menu
#pragma METAINFO("button_mash_ps5", 1, 1, "Daij-Djan")
#include <ps5.gph>
/*
<shortdesc>
Button mash for PS5
AutoCombo : Holding down square, cross, circle or triangale button for automatic repetition instead of press (fast button mash)<br>
On / Off : Press share button : to disabled/enable AutoCombo. (rumbles on activate)<br>
Hold share button 1s for normal options menu
</shortdesc>
@Daij-Djan
Daij-Djan / xcode_project_file_count.rb
Created July 5, 2021 15:51
show use of xcodeproj package
#!/usr/bin/ruby
require 'xcodeproj'
projects = {
'my app: variant a' => '/Users/dpich/Desktop/e80f427ed_a.xcodeproj',
'my app: variant b' => '/Users/dpich/Desktop/e80f427ed_a_modified.xcodeproj',
}
puts "# File Counts"
p="/Users/dpich/Desktop/t/bilder/impressionen/"
echo $p
t="/Users/dpich/Dropbox (Personal)/Maria's Art/__Copies For Website/Impressionen/"
echo $t
cd "$t"
for f in `ls $p`; do
file=$p/$f
img=`pcregrep -o1 -e "<img src=\"(.*_med).*\\.jpeg\"" "$file"`
img_path=$p/$img"_hr.jpeg"
#!/bin/bash
files=`find ~/Desktop/maria -name *_med*.jpeg -a -not -name maria*.jpeg`
text="ยฉ Maria Pich 2020"
for file in $files; do
echo "Add watermark to $file"
magick convert "$file" -font Helvetica -pointSize 15 -draw "gravity SouthEast fill grey text 50,30 '$text' fill white text 51,31 '$text'" "$file"
done
@Daij-Djan
Daij-Djan / listprofiles.sh
Last active January 31, 2020 00:44
get provisioning profiles and their bundle ids, names and creation dates
#!/bin/bash
for f in ~/Library/MobileDevice/Provisioning\ Profiles/*
do
echo \
$(basename "${f%.*}") \
"=> " \
`security cms -D -i "$f" | plutil -extract "Entitlements.application-identifier" xml1 -o - -- - | sed -n -e 's/.*<string>\(.*\)<\/string>.*/\1/p'`
echo " Name: "\
@Daij-Djan
Daij-Djan / button_mash.gpc
Created January 29, 2020 17:33
button_mash.gpc is a script for console tuner that implements 'rapid fire'/button mash. Holding down square, cross, circle or triangale button for automatic repetition instead of press (fast button mash)<br>
#pragma METAINFO("button_mash", 1, 1, "daij-djan")
#include <ps4.gph>
/*
<shortdesc>
***** Button mash@l (PS4) *****<br>
AutoCombo : Holding down square, cross, circle or triangale button for automatic repetition instead of press (fast button mash)<br>
On / Off : Press share button : to disabled/enable AutoCombo. (rumbles on activate)<br>
Hold share button 1s for normal options menu
</shortdesc>
@Daij-Djan
Daij-Djan / sort-plist.py
Created January 22, 2020 03:37
this snippet sort plists keys so i can better diff them
import plistlib
import sys
with open(sys.argv[1],"rb") as input:
plist = plistlib.load(input)
with open(sys.argv[2],"wb") as output:
plistlib.dump(plist, output)