Skip to content

Instantly share code, notes, and snippets.

View mu88's full-sized avatar

Mirko 🇪🇺 🇺🇦 mu88

View GitHub Profile
@mu88
mu88 / Raspi.md
Created February 2, 2024 10:50
Raspi IoT with GPIO in Docker

Control GPIO pins within rootless Docker container on Raspberry Pi

When it comes to controlling the GPIO pins of a Raspberry Pi, the existing tutorials will get you started in a couple of minutes. But most of the code assumes that it runs on bare metal and has sufficient privileges, e. g. to access the GPIO pins.
But what if you want to run this code in a Docker container, or even rootless? This page will explain how to set up all the necessary pieces.

Containerizing the app

Let's use the following sample code to blink an LED ([taken from the official documentation][2]) and save it under BlinkLedSample\Program.cs:

using System;
using System.Device.Gpio;
using System.Threading;
@mu88
mu88 / Bitbucket_AddTaskForFixups.ps1
Created June 25, 2024 12:53
Bitbucket - Add tasks for fixup commits
Clear-Host
# Unlock PowerShell SecretStore with dedicated secret
$password = Import-CliXml -Path "C:\secretStore.xml"
Unlock-SecretStore -Password $password
$baseUrl = "https://bitbucket.company.com/rest/api/latest"
$username = Get-Secret -Name Bitbucket_FixupTasks_Username -AsPlainText
$password = Get-Secret -Name Bitbucket_FixupTasks_Token -AsPlainText
$commitPrefix = "fixup!"
@mu88
mu88 / heise.js
Last active September 28, 2026 08:20
Tampermonkey
// ==UserScript==
// @name Heise Cleanup
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Clean up page
// @author GitHub Copilot 🤖
// @match https://www.heise.de/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=heise.de
// @grant none
// ==/UserScript==
$ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true
Clear-Host
$pendingOsUpgradeResourceIdentifiers = @()
$pendingMaintenanceActions = aws rds describe-pending-maintenance-actions | ConvertFrom-Json
$pendingMaintenanceActions.PendingMaintenanceActions | ForEach-Object {
$resourceIdentifier = $_.ResourceIdentifier
@mu88
mu88 / BGIP2026.md
Last active April 19, 2026 08:57
BGIP 2026
@mu88
mu88 / UpdateSoftware.ps1
Created April 7, 2026 12:38
Update installations (e.g. PowerShell modules, Chocolatey packages, global Node.js packages, etc.)
[CmdletBinding()]
param(
[switch]$Apply
)
$ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $false
function Test-IsAdministrator {
$principal = [Security.Principal.WindowsPrincipal]::new([Security.Principal.WindowsIdentity]::GetCurrent())
@mu88
mu88 / M365Copilot.md
Last active September 2, 2026 16:55
Laptop-Empfehlung

M365 Copilot

Laptop-Empfehlung für Windows 11

Ich unterscheide zwischen den offiziellen Mindestanforderungen und einer sinnvollen Kaufkonfiguration für mehrere Jahre. Eine Garantie für zukünftige Windows-Major-Upgrades gibt es nicht.

Aktuelle Windows-11-Mindestanforderungen

  • CPU: 64 Bit, mindestens 2 Kerne, 1 GHz und auf Microsofts Liste unterstützter Prozessoren
  • RAM: 4 GB
  • Speicher: 64 GB