LIST

xq xml query evernote enex

random util some stuff from my history 3881 xq ~/Downloads/yarle-test/input/foo_export_test.enex 'del(.note)' 3882 xq 'del(.note)' ~/Downloads/yarle-test/input/foo_export_test.enex 3883 xq 'del(.en-export)' ~/Downloads/yarle-test/input/foo_export_test.enex 3888 xq 'del(.en-export)' ~/Downloads/yarle-test/input/foo_export_test.enex 3889 xq 'del(.note)' ~/Downloads/yarle-test/input/foo_export_test.enex 3890 xq 'del(."en-export".note)' ~/Downloads/yarle-test/input/foo_export_test.enex 3891 xq 'del(."en-export".note)' ~/Downloads/yarle-test/input/export_test.enex 3892 xq ~/Downloads/yarle-test/input/export_test.enex 3893 xq '.' ~/Downloads/yarle-test/input/export_test.enex 3898 less Blog.enex ➜ ~ ls -l /opt/homebrew/bin/xq lrwxr-xr-x 1 tjen admin 32 3 jul 19:25 /opt/homebrew/bin/xq -> ../Cellar/python-yq/3.4.3/bin/xq strip content from xml xq 'del(."en-export".note[].content)' ~/Downloads/yarle-run/input/evernote.toc/all/Blog.enex { “en-export”: { “@export-date”: “20231213T100406Z”, “@application”: “Evernote”, “@version”: “10....

August 6, 2024

blog edit frontmatter

find . -type f -name "*.md" -exec sed -i ".bak" -e '/^---$/,/^---$/s/^ //' -e '/^---$/,/^---$/s/^created: \(.*\)$/date: \1\ncreated: \1/' -e '/^---$/,/^---$/s/^evernoteGuid: \(.*\)$/evernoteGuid: \1\nslug: \1/' -e '/^---$/,/^---$/s/^updated: \(.*\)$/updated: \1\nlastmod: \1/' {} \;

August 5, 2024

create hugo site

hugo new site blog --format yaml cd blog git init git add . git commit -m "generated hugo site" git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod git submodule update --init --recursive # needed when you reclone your repo (submodules may not get cloned automatically) echo 'theme: ["PaperMod"]' >> hugo.yaml git add . git commit -m "theme PaperMod"

August 5, 2024

exec fireflyiii importer

kubectl exec --stdin --tty fireflyiii-importer-9dfd577c-r92wb -- php artisan importer:import /import/joint_activobank.json kubectl exec --stdin --tty fireflyiii-importer-9dfd577c-r92wb -- php artisan importer:import /import/joint_kbc.json

August 4, 2024

nextcloud to hugo

clone: git clone https://<PAT>@github.com/username/repo.git filter files changed since (last run) find /data/nextcloud/sdfueneb/files/notes/blog -type f -newermt $(cat last-run.txt) /data/nextcloud/sdfueneb/files/notes/_new/20240727-1543-51-836.md /data/nextcloud/sdfueneb/files/notes/_new/20240727-1431-40-468.md /data/nextcloud/sdfueneb/files/notes/_new/20240727-1422-56-562.md todo: copy to tmp mkdir /tmp/obsidian2hugo # todo: nested folders must be created find /data/nextcloud/sdfueneb/files/notes/_new -type f -newermt 2024-07-24 | awk '{sub("/data/nextcloud/sdfueneb/files/notes", "") ; ; print "cp /data/nextcloud/sdfueneb/files/notes/_new"$1 " /tmp/obsidian2hugo"$1}'|sh CHANGED_SINCE_DATE="2024-07-24" BLOG_FOLDER="/data/nextcloud/sdfueneb/files/notes/_new" while read f; do ; mkdir -p $(dirname "/tmp/obsidian2hugo${f}"); cp "${BLOG_FOLDER}${f}" "/tmp/obsidian2hugo${f}"; done < <(find "${BLOG_FOLDER}" -type f -newermt "${CHANGED_SINCE_DATE}" | awk '{sub("'${BLOG_FOLDER}'", "")}1'); todo: convert markdown obsidian to hugo...

August 1, 2024

Pet-Project: Blog v4

Migrate existing blog to new stack, while migrating evernote to obsidian

July 31, 2024

test kubernetes cronjob manualy

src: https://www.craftypenguins.net/blog/how-to-trigger-a-kubernetes-cronjob-manually/ kubectl create job --from=cronjob/<name of cronjob> <name of job> kgcj NAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGE fireflyiii-db-backup 0 3 * * * False 0 8h 2d18h cloudbackup 0 4 * * * False 0 5m9s kubectl create job --from=cronjob/cloudbackup cloudbackup-test

July 30, 2024

backup postgres database

backup `pg_dump dbname > dumpfile https://www.postgresql.org/docs/current/backup-dump.html pg_dump -h $DBHOST -p $DBPORT -U $DBUSER --format=p --clean -d $DBNAME > /var/lib/backup/$DBNAME.sql https://github.com/firefly-iii/kubernetes/blob/main/charts/firefly-db/templates/backup.tpl pg_dump -h localhost -p 5432 -U firefly --format=p --clean -d firefly > /db-bcp/firefly.sql restore `psql dbname < dumpfile https://www.postgresql.org/docs/current/backup-dump.html psql -h $DBHOST -p $DBPORT -U $DBUSER < /var/lib/backup/${DBNAME}.sql https://github.com/firefly-iii/kubernetes/blob/main/charts/firefly-db/templates/firefly-db-restore-job.yml psql -h localhost -p 5432 -U firefly < /var/lib/postgresql/data/firefly.sql and maybe run this on the core (NOT the db) php artisan firefly-iii:correct-database

July 27, 2024

firefly-iii migrate data from mariadb to postgresql

src: https://github.com/orgs/firefly-iii/discussions/7698#discussioncomment-6544051

July 27, 2024

helm install firefly 3

➜ helmfile git:(main) ✗ helm install firefly-iii firefly-iii/firefly-iii-stack –create-namespace -n firefly2 -f firefly/values.yaml

July 23, 2024