Skip to content

Instantly share code, notes, and snippets.

Janik Vonrotz janikvonrotz

Block or report user

Report or block janikvonrotz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@janikvonrotz
janikvonrotz / SQL Cheat Sheet.md
Last active Oct 25, 2019
SQL Cheat Sheet#SQL#Markdown
View SQL Cheat Sheet.md

SQL languages

DDL is short name of Data Definition Language, which deals with database schemas and descriptions, of how the data should reside in the database.

DML is short name of Data Manipulation Language which deals with data manipulation, and includes most common SQL statements such SELECT, INSERT, UPDATE, DELETE etc, and it is used to store, modify, retrieve, delete and update data in database.

DCL is short name of Data Control Language which includes commands such as GRANT, and mostly concerned with rights, permissions and other controls of the database system.

Datatypes

Text types

@janikvonrotz
janikvonrotz / Create-AlphabeticalSortedListOfAllFunctions.ps1
Created Apr 17, 2014
PowerShell: Create alphabetical sorted list of all functions #PowerShell #PowerUp
View Create-AlphabeticalSortedListOfAllFunctions.ps1
cls
$B = "https://github.com/janikvonrotz/PowerShell-PowerUp/blob/master/functions/"
$A = "H:/SkyDrive/Shared/Projects/GitHub/Powershell-PowerUp/functions/"
$Terms = Get-ChildItem $PSfunctions.Path -Recurse -Filter *.ps1 |
select Name, BaseName, @{L="Verb";E={$_.Name.Split("-")[0]}},@{L="Noun";E={$_.BaseName.Split("-")[1]}}, FullName, @{L="Url";E={$_.FullName -replace "\\","/" -replace $A,$B}} |
Sort-Object Noun, Verb
@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) {
@janikvonrotz
janikvonrotz / Convert-DirectoryToJson.ps1
Last active Sep 22, 2019
Convert-DirectoryToJson #PowerShell #JSON
View Convert-DirectoryToJson.ps1
function Get-RandomHexString {
param($count)
$hex = '012345679ABCDEF'.ToCharArray()
$array = foreach($number in 1..$count ){ $hex | Get-Random}
return (($array) -join "").ToString().ToLower()
}
function Get-WikiType{
param($file)
@janikvonrotz
janikvonrotz / New-SPSiteWithCustomWebAppAndPoolAndAccount.ps1
Last active Sep 17, 2019
PowerShell: Create a new SharePoint Site with a custom web application and managed account and application pool #PowerShell #SharePoint
View New-SPSiteWithCustomWebAppAndPoolAndAccount.ps1
# modules
Import-Module ActiveDirectory
if((Get-PSSnapin 'Microsoft.SharePoint.PowerShell' -ErrorAction SilentlyContinue) -eq $null){Add-PSSnapin 'Microsoft.SharePoint.PowerShell'}
# new service account
$UserName = "SharePoint Service User Wiki"
$UserUPN = "sa-spwiki@vbl.ch"
$UserSam = "sa-spwiki"
$UserPassword = "pass."
@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 / SharePoint 2013 Class Registration Form.md
Last active Aug 29, 2019
SharePoint 2013 Class Registration Form#Markdown#SharePoint
View SharePoint 2013 Class Registration Form.md

Introduction

This walkthrough shows how to build an automated registration form that closes down registration if the seats in the class fill up.

Create Lists

This solution requires two lists, one containing the classes and another one containing the registrations.

Class Calendar

View bookshelf.md


Title: Foundation's Edge
Author: Isaac Asimov
Comment: Should have read the Robot novels before the end of the book. Nonetheless, I am still amazed by how Isaac constructed this kind of stories.
Series: Foundation (Publication Order) #4
Rating: 9/10
ISBN: 0553293389
Finished: 25.08.2018

@janikvonrotz
janikvonrotz / Collect-ImageMetadata.ps1
Last active Aug 16, 2019
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 / DownloadHttps.ps1
Created Dec 6, 2013
PowerShell: Download File from SSL secured Web Server #PowerShell
View DownloadHttps.ps1
$Url = "https://server/file.ext"
$Path = "c:\downloads\file.ext"
[Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
$webClient = new-object System.Net.WebClient
$webClient.DownloadFile( $Url, $Path )
You can’t perform that action at this time.