Skip to content

Instantly share code, notes, and snippets.

View robinmanuelthiel's full-sized avatar
✌️
Never grow up!

Robin-Manuel Thiel robinmanuelthiel

✌️
Never grow up!
View GitHub Profile
@robinmanuelthiel
robinmanuelthiel / aadpodidentity-keyvault-demo.tf
Last active August 16, 2022 05:43
Terraform Setup AAD Pod Identity in AKS clusters with Managed Identity
# Azure Key Vault for Testing Access
resource "azurerm_key_vault" "default" {
name = "rothietftestvault"
location = azurerm_resource_group.default.location
resource_group_name = azurerm_resource_group.default.name
tenant_id = data.azurerm_client_config.current.tenant_id
sku_name = "standard"
}
# Azure Key Vault Access Policy for Managed Identity for yourself
@robinmanuelthiel
robinmanuelthiel / update.yaml
Created September 14, 2021 15:30
GitHub Action to update and publish Docusaurus Docs to GitHub Pages
name: Update documentaion
on:
workflow_dispatch:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
export default class CrytoHelpers {
static generateRandomString(): string {
var array = new Uint32Array(64);
window.crypto.getRandomValues(array);
return Array.from(array, dec => ('0' + dec.toString(16)).substr(-2)).join('');
}
static async pkceChallengeFromVerifierAsync(v: string): Promise<string> {
const hashed = await this.sha256(v);
return this.base64urlencode(hashed);
@robinmanuelthiel
robinmanuelthiel / azuredevops-editorconfig.yaml
Last active April 3, 2020 20:40
EditorConfig Check with Azure DevOps
pool:
vmImage: 'Ubuntu 16.04'
steps:
- bash: |
npm install -g eclint
eclint check eclint check $(git ls-files)
failOnStderr: true
displayName: 'Check EditorConfig violations'
# Requirements
# - Homebrew: https://brew.sh
tap "azure/functions"
tap "caskroom/cask"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
# Essentials
@robinmanuelthiel
robinmanuelthiel / webappforcontainer.tf
Last active November 12, 2019 17:21
The Terraform documentation is missing dedicated configuration details for containers on App Services. Here is, how it's done. https://pumpingco.de/blog/14472/
# Use the Azure Resource Manager Provider
provider "azurerm" {
version = "~> 1.15"
}
# Create a new Resource Group
resource "azurerm_resource_group" "group" {
name = "pumpingcode-webapp-containers-demo"
location = "northeurope"
}
import RPi.GPIO as GPIO
from time import sleep
from RpiMotorLib import RpiMotorLib
from multiprocessing import Process
def rotateMotor(motor, pins, isClockwise):
motor.motor_run(pins, .001, 128, isClockwise, False, "half", .05);
def open(motorLeft, pinsLeft, motorRight, PinsRight):
leftMotorProcess = Process(target=rotateMotor,args=(motorLeft,pinsleft,False,));
#######################################################
# Step 1: Build the application in a container #
#######################################################
# Download the official ASP.NET Core SDK image
# to build the project while creating the docker image
FROM microsoft/dotnet:2.1-sdk as build
WORKDIR /app
# Restore NuGet packages
@robinmanuelthiel
robinmanuelthiel / ArduinoMarquee.ino
Created August 17, 2016 16:16
A simple Arduino Sketch to let a marquee run through a LED panel.
// Use LiquidCrystal library to communicate with LCD
#include <LiquidCrystal.h>
// Select the pins used on the LCD panel
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
// Define message to show
String message = "My future tweets will be in this format";
void setup() {
@robinmanuelthiel
robinmanuelthiel / MainPage.xaml
Created February 16, 2017 14:36
Custom Xamarin.Forms Menu Item
<?xml version="1.0" encoding="utf-8"?>
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:ZeissCantinaMenuSample"
x:Class="ZeissCantinaMenuSample.ZeissCantinaMenuSamplePage">
<local:MenuItem x:Name="TestMenuItem" Text="Hallo" Image="AlertIcon.png" Clicked="TestMenuItem_Clicked" />
</ContentPage>