Hotel Graf Zeppelin in Konstanz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [CmdletBinding()] | |
| param( | |
| [switch]$Apply | |
| ) | |
| $ErrorActionPreference = "Stop" | |
| $PSNativeCommandUseErrorActionPreference = $false | |
| function Test-IsAdministrator { | |
| $principal = [Security.Principal.WindowsPrincipal]::new([Security.Principal.WindowsIdentity]::GetCurrent()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ErrorActionPreference = "Stop" | |
| $PSNativeCommandUseErrorActionPreference = $true | |
| Clear-Host | |
| $pendingOsUpgradeResourceIdentifiers = @() | |
| $pendingMaintenanceActions = aws rds describe-pending-maintenance-actions | ConvertFrom-Json | |
| $pendingMaintenanceActions.PendingMaintenanceActions | ForEach-Object { | |
| $resourceIdentifier = $_.ResourceIdentifier |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Remove Ape Paywall Overlay | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.0 | |
| // @description Removes the paywall overlay with ID "ape-paywall-overlay" from websites automatically. | |
| // @author GitHub Copilot 🤖 | |
| // @match *://*/* | |
| // @run-at document-end | |
| // @grant none | |
| // ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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!" |
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.
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;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dir .\ -include bin,obj* -recurse | foreach($_) { rd $_.fullname -Recurse -Force} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $Continue = Read-Host "Do you want to continue? Enter 'Yes'" | |
| if ($Continue -ne "Yes") { | |
| exit | |
| } | |
| if (([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator") -ne $true) { | |
| Write-Host "Run this script as admin" | |
| exit | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Copy Jira ticket identifier | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.0 | |
| // @description Concats the ticket number and title of a Jira ticket | |
| // @author mu88 | |
| // @match https://<<Jira>>/browse/* | |
| // @icon https://<<Jira>>/s/<<Change>>/_/images/fav-generic.png | |
| // @grant none | |
| // ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import framebuf | |
| import gc | |
| from machine import Pin, SPI, I2C | |
| import network | |
| import time | |
| import urequests | |
| import utime | |
| class INA219: | |
| def __init__(self, i2c_bus=1, addr=0x40): |
NewerOlder