Skip to content

Instantly share code, notes, and snippets.

View pkirch's full-sized avatar

Peter Kirchner pkirch

View GitHub Profile
@pkirch
pkirch / linux.md
Created March 29, 2021 08:05
LinuxGettingStarted

Move Folders

https://askubuntu.com/a/634253/339238

For those trying to move folder, on Ubuntu using Putty, just use the following command:

sudo mv /fromPath/ /toPath/ for example:

sudo mv /root/folder1 /home/folder2/

@pkirch
pkirch / PythonGettingStarted.md
Created March 19, 2021 08:51
Python Getting Started
@pkirch
pkirch / websockets-best-practices.md
Created January 23, 2020 13:18
Summary of a research about best practices for and securing of web sockets which are used in a client-server architecture. (No browser-server scenario.)

Best Practices for and Securing of Web Sockets

In one of our customer projects we have used Web Sockets for client-server communication of real-time data.

Question

What are the characteristics of Web Sockets vs. RAW sockets?

Answer

$allVMs = Get-AzureVM
$allVMs | Group-Object -Property ServiceName
<# Output
Count Name Group
----- ---- -----
2 pksttest1 {Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVMRoleListContext, Microsoft.WindowsAzure.Commands.ServiceManage...
1 pksttest2 {Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVMRoleListContext}
#>
Select-AzureSubscription "MSFT MVA Live"
Switch-AzureMode AzureResourceManager
New-AzureResourceGroup –Name mvasqlsvr –Location "West Europe"
New-AzureKeyVault -VaultName mvasqlsvr -ResourceGroupName mvasqlsvr -Location "West Europe" -SKU Premium
$key1 = Add-AzureKeyVaultKey -VaultName mvasqlsvr -Name testkey1 -Destination Software
# Warning: This script is only for demo purposes.
# The connection to the WebDAV server is not secured.
# Content and user credentials are transmitted unencrypted.
# Before using this script, you need the PowerShell commandlets installed, have already an Azure
# subscription imported and the first three settings in this file changed. (See region Settings.)
# How to do this, you can read here (in German):
# http://blogs.msdn.com/b/pkirchner/archive/2015/01/13/grundlagen-powershell-f-252-r-microsoft-azure-installieren.aspx
# http://blogs.msdn.com/b/pkirchner/archive/2015/01/19/grundlagen-azure-amp-powershell-verwaltungszertifikate-installieren.aspx
# Microsoft Virtual Academy
# Automatisierte Konfiguration in Azure im Überblick
# 402 - http://aka.ms/mva-1505-402
# Settings
$subscriptionName = "MSFT MVA Live" # Get-AzureSubscription
$location = "West Europe" # Get-AzureLocation
$serviceName = "mvaconfig402"
$storageAccountName = "mvaconfig401" # Reuse storage account with already published PS configurations.
$adminUsername = "adm_demo"
# Microsoft Virtual Academy
# Automatisierte Konfiguration in Azure im Überblick
# 401 - http://aka.ms/mva-1505-401
configuration ADDSInstall
{
node ("localhost")
{
WindowsFeature ADDS
{
# Microsoft Virtual Academy
# Automatisierte Konfiguration in Azure im Überblick
# 301 - http://aka.ms/mva-1505-301
param($name, $number)
Write-Output "Name: $name"
Write-Output "Number: $number"
$features = Get-WindowsFeature