Skip to content

Instantly share code, notes, and snippets.

@darconeous
darconeous / rect-starlink-cable-hack.md
Last active November 4, 2025 17:21
Hacking the Rectangular Starlink Dishy Cable
@joewashington75
joewashington75 / apim-to-azure-service-bus-on-api-error.xml
Created July 13, 2021 15:17
APIM send message to Azure Service Bus when backend API is down
<policies>
<inbound>
<base />
<set-backend-service base-url="https://yourapihere.com" />
</inbound>
<backend>
<base />
</backend>
<outbound>
<choose>
@joewashington75
joewashington75 / apim-to-azure-service-bus-policy.xml
Created July 13, 2021 14:53
Writing to Azure Service Bus using APIM Policy
<!--
IMPORTANT:
- Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.
- To apply a policy to the incoming request (before it is forwarded to the backend service), place a corresponding policy element within the <inbound> section element.
- To apply a policy to the outgoing response (before it is sent back to the caller), place a corresponding policy element within the <outbound> section element.
- To add a policy, place the cursor at the desired insertion point and select a policy from the sidebar.
- To remove a policy, delete the corresponding policy statement from the policy document.
- Position the <base> element within a section element to inherit all policies from the corresponding section element in the enclosing scope.
- Remove the <base> element to prevent inheriting policies from the corresponding section element in the enclosing scope.
- Policies are applied in the order of their appearance, from the top down.
@joewashington75
joewashington75 / shared-access-signature-token.ps1
Created July 13, 2021 14:29
Generating a shared access signature token using Powershell
$URI="https://{{service-bus-name-here}}.servicebus.windows.net/{{queue-name-here}}"
$Access_Policy_Name="{{access-policy-name-here}}"
$Access_Policy_Key="{{access-policy-key-here}}"
$Expires=([DateTimeOffset]::Now.ToUnixTimeSeconds())+7568640
$SignatureString=[System.Web.HttpUtility]::UrlEncode($URI)+ "`n" + [string]$Expires
$HMAC = New-Object System.Security.Cryptography.HMACSHA256
$HMAC.key = [Text.Encoding]::ASCII.GetBytes($Access_Policy_Key)
$Signature = $HMAC.ComputeHash([Text.Encoding]::ASCII.GetBytes($SignatureString))
$Signature = [Convert]::ToBase64String($Signature)
$SASToken = "SharedAccessSignature sr=" + [System.Web.HttpUtility]::UrlEncode($URI) + "&sig=" + [System.Web.HttpUtility]::UrlEncode($Signature) + "&se=" + $Expires + "&skn=" + $Access_Policy_Name
@KrustyHack
KrustyHack / doc.adoc
Last active September 19, 2024 16:37
proxmox-ubuntu-cloud-howto

Cloud-Init Support

Cloud-Init is the defacto multi-distribution package that handles early initialization of a virtual machine instance. Using Cloud-Init, one can configure network

@SimpleHomelab
SimpleHomelab / docker-media-server-basic.yml
Last active November 1, 2025 14:18
Docker Compose for Ultimate Docker Home Media Server - Basic
Deprecated.
Please check here for updates: https://github.com/SimpleHomelab/Docker-Traefik
version: '3.1'
services:
unifi:
container_name: unifi
restart: unless-stopped
image: linuxserver/unifi
volumes:
- /srv/docker/unifi:/config
environment:
- PGID=0
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000