Skip to content

Instantly share code, notes, and snippets.

Avatar

Janik Vonrotz janikvonrotz

View GitHub Profile
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\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 / Install WordPress Blog.md
Created Mar 3, 2014
Step by Step: Install WordPress Blog #PHP #MySQL #Nginx #phpMyAdmin #WordPress #Markdown #Ubuntu
View Install WordPress Blog.md

Finishing this guide you'll get:

  • A running WordPress installation
  • Nginx proxy with PHP and Fast CGI
  • MySQL server accessible with phpMyAdmin

Specification of latest running installation:

  • Date: 03.03.2014
@janikvonrotz
janikvonrotz / Delete-AllCmdKeyCredentials.ps1
Created Dec 6, 2013
PowerShell: Delete all cmdkey credentials #PowerShell #Windows
View Delete-AllCmdKeyCredentials.ps1
cmdkey /list | ForEach-Object{if($_ -like "*Ziel:*"){cmdkey /del:($_ -replace " ","" -replace "Ziel:","")}}
@janikvonrotz
janikvonrotz / Update-SPTokenLifetime.ps1
Created Apr 3, 2014
PowerShell: Update SharePoint Token Lifetime #SharePoint #PowerShell
View Update-SPTokenLifetime.ps1
if(-not (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)){Add-PSSnapin "Microsoft.SharePoint.PowerShell"}
# update SharePoint cache token lifetime
$SPContentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$SPContentService.TokenTimeout = (New-TimeSpan -minutes 5)
$SPContentService.Update()
# udpate SharePoint claims token lifetime
@janikvonrotz
janikvonrotz / Disable-AutoLanProxyDetection.reg
Created Jan 13, 2014
Disable Automatic Lan Proxy Detection for Windows Internet Explorer (9 and higher) to speed up WebDAV connections #Registry #Windows
View Disable-AutoLanProxyDetection.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"AutoDetect"=dword:00000000
@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())
{
@janikvonrotz
janikvonrotz / Get-AllSPLists.ps1
Last active May 14, 2020
PowerShell: Get SharePoint Site Collection Objects #PowerShell #SharePoint
View Get-AllSPLists.ps1
Get-SPsite -Limit all | %{
$_ | Get-SPWeb -Limit all | %{
$_.Lists | %{
$_
}
}
}
@janikvonrotz
janikvonrotz / Unattended Encrypted Incremental Backup to Amazon S3.md
Last active May 8, 2020
Ubuntu: Unattended Encrypted Incremental Backup to Amazon S3#AmazonAWS#Markdown
View Unattended Encrypted Incremental Backup to Amazon S3.md

Introduction

For this task we are going to configure a duplicity script wrapper. Unregarded of the installation instructions it's expected that you have already signed up for an Amazon account and know how to use their services.

Requirements

  • Ubuntu server
  • duplicity, Git, GnuPG
  • MySQL
@janikvonrotz
janikvonrotz / Check System Resources.sh
Last active Apr 20, 2020
Ubuntu: Check System Resources #Ubuntu
View Check System Resources.sh
# disk space
df -h
# ram in mega bytes
free -m
# detailed ram usage
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",
You can’t perform that action at this time.