Skip to content

Instantly share code, notes, and snippets.

Avatar

Janik Vonrotz janikvonrotz

View GitHub Profile
@janikvonrotz
janikvonrotz / Convert-DirectoryToJson.ps1
Last active Apr 15, 2021
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 / 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 / SQL Cheat Sheet.md
Last active Apr 14, 2021
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 / 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 / SharePoint 2013 Class Registration Form.md
Last active Jan 29, 2021
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 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 / map.geojson
Last active Jan 17, 2021
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.
@janikvonrotz
janikvonrotz / Check System Resources.sh
Last active Jan 17, 2021
Ubuntu: Check System Resources #Ubuntu
View Check System Resources.sh
# disk space
df -h
# ram in mega bytes
free -m
# detailed ram usage
@janikvonrotz
janikvonrotz / Install Ubuntu packages.md
Last active Jan 17, 2021
Ubuntu: Install Ubuntu packages #Markdown #Ubuntu
View Install Ubuntu packages.md
View Garmin Connect Weight.md