Skip to content

Instantly share code, notes, and snippets.

View BertMueller18's full-sized avatar

Bert Mueller BertMueller18

  • Leipzig, Germany
View GitHub Profile
@jborean93
jborean93 / HttpSslCert.ps1
Created April 1, 2022 01:35
Create pwsh wrapper for netsh.exe http add|delete|show sslcert
[Flags()] enum CertCheckMode {
VerifyClientCertRevocation = 0x00000000
VerifyRevocationUsingCacheOnly = 0x00000002
DefaultRevocationFreshnessTimeIsEnabled = 0x00000004
NoUsageCheck = 0x00010000
}
[Flags()] enum SslFlags {
None = 0x00000000
UseDsMapper = 0x00000001
@aclarknexient
aclarknexient / sane-caching.nginx.conf
Created March 31, 2022 12:53 — forked from philipstanislaus/sane-caching.nginx.conf
Sample Nginx config with sane caching settings for modern web development
# Sample Nginx config with sane caching settings for modern web development
#
# Motivation:
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools.
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh
# and juicy version of your assets available.
# At some point, however, you want to show your work to testers, your boss or your client.
# After you implemented and deployed their feedback, they reload the testing page – and report
# the exact same issues as before! What happened? Of course, they did not have developer tools
# open, and of course, they did not empty their caches before navigating to your site.
@steele-ntwrk
steele-ntwrk / CD Pipeline.md
Last active November 18, 2023 00:02
Describe the process of setting up CICD pipeline

Configuring a CI/CD Pipeline

Handy Commands

Update Linux - sudo apt-get update

Create Python virtual env python3 -m venv /path/to/new/virtual/environment

@JSinghDev
JSinghDev / LXCBindMount.md
Last active December 18, 2025 03:20 — forked from ajmassi/LXCBindMount.md
Create a bind mount from a Proxmox host on an unprivileged lxc container

Proxmox Assign Bind Mount To Unprivileged Container

In order for the LXC container to have full access the proxmox host directory, a subgid is set as owner of a host directory, and an ACL is used to ensure permissions.

Bind Mount dataset to LXC

Add the following line to /etc/pve/lxc/<CT_ID>.conf

mp0:/mount/point/on/host,mp=/mount/point/on/lxc

OR

pct set 100 -mp0 /mnt/bindmounts/shared,mp=/shared

function Remove-GraphGroupMember {
<#
.SYNOPSIS
Removes Members from Azure AD Security Group or Microsoft 365 Group
.DESCRIPTION
Removes Members from Azure AD Security Group or Microsoft 365 Group
.PARAMETER UserID
This is the User's ID. This is the user to be removed from the group
@potatoqualitee
potatoqualitee / getguid.ps1
Created December 28, 2021 12:32
Get GUID / Product Id / Registration ID from Windows Update EXE Executable
# Install WIX toolset
Import-Module "C:\Program Files (x86)\WiX Toolset v3.11\bin\Microsoft.Deployment.Compression.dll"
Import-Module "C:\Program Files (x86)\WiX Toolset v3.11\bin\\Microsoft.Deployment.Compression.Cab.dll"
$cab = New-Object Microsoft.Deployment.Compression.Cab.Cabinfo "$home\Downloads\file\dotnet-sdk-5.0.404-win-x64_a943fac999a30b3eb83580112b793d37de0c0700.exe"
$cab.UnpackFile("0","C:\temp\0.xml")
$a = [xml](Get-Content "C:\temp\0.xml")
$guid = [guid]$a.BurnManifest.Registration.Id
@vexx32
vexx32 / Set-Wallpaper.ps1
Created December 14, 2021 14:08
PowerShell function that changes Windows wallpaper with p/invoke
function Set-Wallpaper {
<#
.SYNOPSIS
Applies a specified wallpaper to the current user's desktop
.EXAMPLE
Set-WallPaper -Image "C:\Wallpaper\Default.jpg"
#>
[CmdletBinding()]
param(
## Usage
# GUI that saves and encrypts credentials that generate Bearer Token (Run this once per app registration)
# If application-only Graph API Permision, click "Export Tenant Config" button
# If also (or only) delegate permissions click both "Export Tenant Config" and "Export Tenant Credentials" buttons
# Copy the last command output from the GUI. This is how you connect each time.
Add-GraphConfig -Tenant Contoso -workload DescribePermissions
# GUI will provide exactly what to use to connect
Connect-Graph -Tenant Contoso -Workload DescribePermissions #use -Delegated switch if needed
function Connect-GraphRefresh {
[CmdletBinding()]
param (
)
if (-not $Delegated) {
Connect-Graph -Tenant $Script:Tenant -Workload $Script:Workload -Delegated:$Script:Delegated
}
else {
function Connect-Graph {
<#
.SYNOPSIS
Connect to Graph with delegate or application only permissions
.DESCRIPTION
Connect to Graph with delegate or application only permissions
.PARAMETER Tenant
** Use NameOfTenant if the tenant domain is NameOfTenant.onmicrosoft.com **