Skip to content

Instantly share code, notes, and snippets.

Avatar

Janik Vonrotz janikvonrotz

View GitHub Profile
View Pull all git projects.ps1
$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",
View Backup to external drive.md

Backupt to external drive

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

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

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

View Garmin Connect Weight.md
@janikvonrotz
janikvonrotz / Manually renew letsencrypt certificate.md
Created Apr 16, 2020
Manually renew letsencrypt certificate
View Manually renew letsencrypt certificate.md

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 Apr 7, 2020
Split file names into year and month folder
View Split-FileNamesByYearMonth.sh
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 Jul 20, 2020
Extract and transfrom metadata of all image files in a folder#powershell
View Collect-ImageMetadata.ps1
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())
{
View bookshelf.md


Title: Factfulness: Ten Reasons We're Wrong About the World – and Why Things Are Better Than You Think
Author: Hans Rosling, Ola Rosling, Anna Rosling Rönnlund
Comment: This book changed my perception of the world subtly
Rating: 10/10
ISBN: 1473637465
Finished: 30.01.2020


Title: When The Moon Shines By Day

@janikvonrotz
janikvonrotz / map.geojson
Last active May 20, 2019
Places I've been to
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View README.md
title author
Readme
Janik von Rotz

Knowledge

Logo

The knoweldge articles are stored in a strict structure. There are 7 top level folders:

@janikvonrotz
janikvonrotz / Convert-KeePassToPass.ps1
Last active Oct 20, 2019
Convert KeePass to Pass #KeePass #PowerShell
View Convert-KeePassToPass.ps1
[xml]$Content = Get-Content -Path "KeepassData.xml"
<#
Access the xml data:
Content.KeePassFile.Root.Group.Group.Entry[67].String[0].Value
#>
function Traverse-Tree ($Node, $ParentPath) {
You can’t perform that action at this time.