Skip to content

Instantly share code, notes, and snippets.

View janikvonrotz's full-sized avatar

Janik von Rotz janikvonrotz

View GitHub Profile
graph LR;
    A[Alice]-->|Hi Bob|B[Bob];
@janikvonrotz
janikvonrotz / update-sync-exclude-list
Last active November 17, 2021 19:11
Update Sync Exclude List for Nextcloud Client
#!/bin/sh
# origin: https://github.com/nextcloud/desktop/blob/master/sync-exclude.lst
if [ ! -f "~/.config/Nextcloud/sync-exclude.lst" ]; then
SYNC_EXCLUDE=~/.config/Nextcloud/sync-exclude.lst
fi
if [ ! -f "~/.var/app/com.nextcloud.desktopclient.nextcloud/config/Nextcloud/sync-exclude.lst" ]; then
SYNC_EXCLUDE=~/.var/app/com.nextcloud.desktopclient.nextcloud/config/Nextcloud/sync-exclude.lst
@janikvonrotz
janikvonrotz / Pull all git projects.ps1
Created April 16, 2020 18:06
Pull all git projects
$gitUser = @(
"$Home\LocalDrive\GitHub",
"$Home\LocalDrive\GitLab",
"$Home\LocalDrive\GitHub_HaloCustomEdition",
"$Home\LocalDrive\GitHub_Hochschule-Luzern",
"$Home\LocalDrive\GitLab_Apoveda",
"$Home\LocalDrive\GitLab_Valora",
"$Home\LocalDrive\GitHub_Abilium",
"$Home\LocalDrive\GitHub_todo-md",
"$Home\LocalDrive\GitHub_Mint-System",
@janikvonrotz
janikvonrotz / Backup to external drive.md
Last active September 21, 2020 20:37
Backup to external drive

Backupt to external drive

robocopy C:\Users\janik\LocalDrive D:\LocalDrive /MIR /R:1 /W:0 /XD node_modules

robocopy C:\Users\janik\Nextcloud D:\Nextcloud /MIR /R:1 /W:0

robocopy C:\Users\janik\Nextcloud2 D:\Nextcloud2 /MIR /R:1 /W:0

robocopy C:\Users\janik\janikv.cloud D:\janikv.cloud /MIR /R:1 /W:0

@janikvonrotz
janikvonrotz / Garmin Connect Weight.md
Created April 16, 2020 18:04
Garmin Connect Weight
@janikvonrotz
janikvonrotz / Manually renew letsencrypt certificate.md
Created April 16, 2020 18:02
Manually renew letsencrypt certificate

Clone the letsencrypt cli.

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt

Request a new certificate for your domain manually.

@janikvonrotz
janikvonrotz / Split-FileNamesByYearMonth.sh
Created April 7, 2020 13:13
Split file names into year and month folder
for file in *; do
echo $file;
yearmonth=$(echo $file | grep -o '[0-9][0-9][0-9][0-9]-[0-9][0-9]')
newfilename=$(echo $file | grep -o '[0-9][0-9]-[a-z].*.md$')
mkdir $yearmonth
mv $file $yearmonth/$newfilename
done
@janikvonrotz
janikvonrotz / Collect-ImageMetadata.ps1
Last active July 20, 2020 18:36
Extract and transfrom metadata of all image files in a folder#powershell
Function Get-FileMetaData {
Param([string[]]$folder)
foreach($sFolder in $folder)
{
$a = 0
$objShell = New-Object -ComObject Shell.Application
$objFolder = $objShell.namespace($sFolder)
foreach ($File in $objFolder.items())
{
@janikvonrotz
janikvonrotz / bookshelf.md
Last active December 21, 2020 09:26
Bookshelf

2020


Title: Wolkenbruchs waghalsiges Stelldichein mit der Spionin
Series: Wolkenbruch #2
Author: Thomas Meyer
Comment: Jewis customs from an exaggerated perspective. Amusing and provocative.
Rating: 7/10
ISBN: 3257070802
Finished: 15.11.2020

@janikvonrotz
janikvonrotz / map.geojson
Last active January 17, 2021 16:17
Places I've been to
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.