Skip to content

Instantly share code, notes, and snippets.

@zammitjohn
zammitjohn / argocd_sso_app.tf
Created February 15, 2024 15:45
This Terraform file creates an Azure AD app registration and configures it for OIDC authentication with Argo CD
# For more details, see: https://argo-cd.readthedocs.io/en/stable/operator-manual/user-management/microsoft/#azure-ad-app-registration-auth-using-oidc
data "azuread_client_config" "current" {}
resource "azuread_application" "app_registration" {
display_name = "Argo CD"
sign_in_audience = "AzureADMyOrg"
required_resource_access {
resource_app_id = "00000003-0000-0000-c000-000000000000" # Microsoft Graph
@zammitjohn
zammitjohn / install_brews.sh
Last active March 13, 2025 11:48
A script to install brew packages from a text file
#!/bin/bash
# A script to install brew packages from a text file
# Check if Homebrew is installed
if ! command -v brew &> /dev/null
then
echo "Homebrew is not installed. Please install it first."
exit 1
fi
@zammitjohn
zammitjohn / vs-wdk-buildtools-dockerfile
Created April 26, 2023 12:44
WDK includes a VSIX package, which contains the Visual Studio extension that integrates Visual C++ with the WDK build .props and .targets. You need to install the MSBuild .props and .targets included in the VSIX package. Fortunately, you can manually extract the VSIX and copy the contents into Visual Studio.
RUN Copy-Item "\"${Env:ProgramFiles(x86)}\Windows Kits\10\Vsix\VS2019\WDK.vsix\"" 'C:\wdkvsix.zip'
RUN Expand-Archive 'C:\wdkvsix.zip' -DestinationPath 'C:\WdkVsix'
RUN Copy-Item 'C:\WdkVsix\$MSBuild\Microsoft\*' -Destination 'C:\BuildTools2019\MSBuild\Microsoft' -Recurse -Force
RUN Remove-Item 'C:\WdkVsix' -Force -Recurse
RUN Remove-Item 'C:\wdkvsix.zip' -Force
@zammitjohn
zammitjohn / dynu-sagemcom.md
Last active November 10, 2022 13:11
Dynu Dynamic DNS Client settings on Sagemcom routers

Settings

You can use dynu dynamic DNS service with Sagemcom routers by editing the custom profile.

  • Username: account username
  • Password: MD5 or SH256 hashed account password
  • Hostname: registered domain name
  • Server: api.dynu.com
  • Port: 80
  • Basic Authentication: Disabled
  • Request: http://api.dynu.com/nic/update?hostname=[DOMAIN]&password=[PASSWORD]
  • Update Interval: 10800
@zammitjohn
zammitjohn / squid-proxy-block-internal.md
Last active July 20, 2022 21:00
Squid Proxy Configuration to block internal IPv4 and IPv6

ACL

  1. DENY: 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 fc00::/7 fe80::/10 (destination)
  2. ALLOW: 1.0.0.0/1 128.0.0.0/1 2000::/3 (source)