Skip to content

Instantly share code, notes, and snippets.

@pbt001
pbt001 / imapsync.md
Created January 19, 2019 21:42 — forked from rolfn/imapsync.md
Synchronisation zweier IMAP-Server mit »imapsync«

Synchronisation zweier IMAP-Server mit »imapsync«

Das Programm »imapsync« ist geeignet, zwei IMAP-Server derart zu synchronisieren, dass sich alle oder nur manche E-Mails des Quell-Servers auch auf dem Ziel-Server befinden. Dies kann nützlich sein, wenn man vorhat, künftig einen neuen E-Mail-Server für den eigenen E-Mail-Verkehr zu nutzen und man will dabei nicht auf die alten E-Mails verzichten. Auch kann der Ziel-Server einfach nur dazu dazu dienen, eine Sicherheitskopie aller E-Mails zu speichern.

Im Folgenden wird beschrieben, wie man unter Verwendung des Linux-Dienstes »systemd« zeitlich gesteuert E-Mails von einem IMAP-Server zu einem anderen kopiert.

Festlegen des Zeitablaufs

Die Datei $HOME/.config/systemd/user/mail-sync.timer

@pbt001
pbt001 / Rclone.md
Created January 19, 2019 21:46 — forked from rolfn/Rclone.md
Zugriff auf Online-Speicher per »Rclone«

Zugriff auf Online-Speicher per »Rclone«

Das Programm »Rclone« ist geeignet, auf eine Vielzahl von Online-Speicher (»Owncloud/Nextcloud«, »Dropbox«, »Onedrive«, diverse WebDav-Zugänge u.v.a.) zuzugreifen. Gelingt es, diese Online-Speicher beim Einloggen in einen Linux-Rechner automatisch zu mounten, hat man eine sehr bequeme Möglichkeit, eigene Dateien zu sichern und an anderen Orten zugänglich zu machen. Man kann den gesamten Online-Speicher oder Teile davon von »Rclone« verschlüsseln lassen, womit man auch sensible Daten auf wenig verlässlichen Speicherorten unterbringen kann. Hervorzuheben ist, dass die Dokumentation von

@pbt001
pbt001 / restic.md
Created January 19, 2019 21:47 — forked from rolfn/restic.md
Backup auf Cloud-Speicher mit »restic«

Backup auf Cloud-Speicher mit »restic«

Das Programm »restic« ist ein modernes Backup-Programm, welches als Ziel lokal gemountete Verzeichnisse verwenden kann. Darüber hinaus unterstützt es einige ausgewählte Protokolle, um direkt auf Cloud-Speicher zugreifen zu können (SFTP, S3, OpenStack Swift, Google Cloud Storage u.a.). Im Folgenden soll gezeigt werden, wie man unter Linux automatische Backups konfigurieren kann. Als Ziel wird in diesem Beispiel der S3-kompatible »Object Storage Service« (TelekomCLOUD) benutzt. Sinngemäß lassen sich die folgenden Angaben auch auf andere Backup-Ziele (z.B. NFS-Mounts) anwenden. Getestet wurde

@pbt001
pbt001 / Move to Top.applescript
Created January 19, 2019 23:53 — forked from nriley/Move to Top.applescript
Move tasks to the top of their containing task or project in OmniFocus
tell application "OmniFocus"
tell default document's first document window's content
set _tasks to (selected trees where its value's class is task)'s value
set _tasks to _tasks's reverse
repeat with _task in _tasks
tell _task's parent task
move _task to beginning of tasks
end tell
end repeat
end tell
@pbt001
pbt001 / csv2table.hs
Created January 22, 2019 15:44 — forked from baig/csv2table.hs
A Pandoc filter that replaces Image links having *.csv extension with Pandoc Markdown Tables.
#!/usr/bin/env runhaskell
{-
The MIT License (MIT)
Copyright (c) 2015 Wasif Hasan Baig <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
@pbt001
pbt001 / pandoc.Makefile
Created February 7, 2019 09:18 — forked from bertvv/pandoc.Makefile
Makefile for Markdown -> PDF using pandoc
# Generate PDFs from the Markdown source files
#
# In order to use this makefile, you need some tools:
# - GNU make
# - Pandoc
# - LuaLaTeX
# - DejaVu Sans fonts
# Directory containing source (Markdown) files
source := src
@pbt001
pbt001 / Makefile
Created February 7, 2019 09:18 — forked from lmullen/Makefile
PDF slides and handouts using Pandoc and Beamer
SLIDES := $(patsubst %.md,%.md.slides.pdf,$(wildcard *.md))
HANDOUTS := $(patsubst %.md,%.md.handout.pdf,$(wildcard *.md))
all : $(SLIDES) $(HANDOUTS)
%.md.slides.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -o $@
%.md.handout.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -V handout -o $@
@pbt001
pbt001 / Makefile
Created February 7, 2019 09:19 — forked from kristopherjohnson/Makefile
Makefile that uses Pandoc to generate HTML, PDF, DOCX, etc. from Markdown source files
# Makefile
#
# Converts Markdown to other formats (HTML, PDF, DOCX, RTF, ODT, EPUB) using Pandoc
# <http://johnmacfarlane.net/pandoc/>
#
# Run "make" (or "make all") to convert to all other formats
#
# Run "make clean" to delete converted files
# Convert all files in this directory that have a .md suffix
@pbt001
pbt001 / Makefile.pandoc
Created February 7, 2019 09:20 — forked from sudarkoff/Makefile.pandoc
Makefile for converting Markdown to various formats with Pandoc, TeX and kindlegen
BUILD_DIR := gen
# pandoc is a handy tool for converting between numerous text formats:
# http://johnmacfarlane.net/pandoc/installing.html
PANDOC := pandoc
# pandoc options
# Liberation fonts: http://en.wikipedia.org/wiki/Liberation_fonts
PANDOC_PDF_OPTS := --toc --chapters --base-header-level=1 --number-sections --template=virsto_doc.tex --variable mainfont="Liberation Serif" --variable sansfont="Liberation Sans" --variable monofont="Liberation Mono" --variable fontsize=12pt --variable documentclass=book
PANDOC_EBOOK_OPTS := --toc --epub-stylesheet=epub.css --epub-cover-image=cover.jpg --base-header-level=1
@pbt001
pbt001 / fuz.sh
Created February 20, 2019 21:47 — forked from BaseCase/fuz.sh
#!/usr/bin/env bash
set -e
main() {
previous_file="$1"
file_to_edit=`select_file $previous_file`
if [ -n "$file_to_edit" ] ; then
"$EDITOR" "$file_to_edit"
main "$file_to_edit"