Skip to content

Instantly share code, notes, and snippets.

View matt-FFFFFF's full-sized avatar
🙀

Matt White matt-FFFFFF

🙀
View GitHub Profile
@matt-FFFFFF
matt-FFFFFF / unifiedkernelsetup.sh
Last active August 27, 2023 04:56
Linux unified kernel setup for secureboot systemd-boot arch
#!/bin/bash
DATESTRING=$(date +%Y.%m.%d.%H.%M)
KERNEL=$(file -bL /boot/vmlinuz-linux-surface | grep -o 'version [^ ]*' | cut -d ' ' -f 2)
echo "Generating initramfs..."
mkinitcpio -p linux-surface -k $KERNEL
echo "Making copy of /usr/lib/os-release, Using suffux $KERNEL-$DATESTRING"
cp /usr/lib/os-release .
@matt-FFFFFF
matt-FFFFFF / profiles.json
Created December 9, 2019 10:45
Windows Terminal profiles.json
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"globals" :
{
"alwaysShowTabs" : true,
"defaultProfile" : "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
[
@matt-FFFFFF
matt-FFFFFF / helmgetcurrentslot.sh
Created September 12, 2019 13:52
Helm get slot
if [ "`helm get values --all $(releaseName) | grep -Po 'productionSlot: \K.*'`" == "green" ]; then
echo "##vso[task.setvariable variable=deploymentslot;isSecret=false;isOutput=true;]blue"
echo "##vso[task.setvariable variable=currentslot;isSecret=false;isOutput=true;]green"
else
echo "##vso[task.setvariable variable=deploymentslot;isSecret=false;isOutput=true;]green"
echo "##vso[task.setvariable variable=currentslot;isSecret=false;isOutput=true;]blue"
fi
@matt-FFFFFF
matt-FFFFFF / LCMConfig.ps1
Last active August 8, 2019 13:14
PowerShell DSC Configure LocalConfigurationManager
param
(
[Parameter(Mandatory=$True)]
[ValidateSet("pull","push")]
[String]$mode,
[Parameter]
$RegistrationUrl,
[Parameter]
@matt-FFFFFF
matt-FFFFFF / Get-CertificateAIACDP.ps1
Created June 13, 2018 11:24
Gets a certificate from a webserver and returns AIA and CDP FQDNs. Note, does not do OCSP.
New-Variable -Name 'OIDCDP' -Value '2.5.29.31' -Option ReadOnly -Force
New-Variable -Name 'OIDAIA' -Value '1.3.6.1.5.5.7.1.1' -Option ReadOnly -Force
#New-Variable -Name 'OIDAIAOCSP' -Value '1.3.6.1.5.5.7.48.1' -Option ReadOnly -Force
Function Get-RemoteTLSCertificate
{
param (
[Parameter(Mandatory=$true)]
[string]
$Hostname,