Skip to content

Instantly share code, notes, and snippets.

@rajbos
rajbos / Get-JWTToken.ps1
Last active July 11, 2024 20:58
Load jwt token from GitHub App for authentication
# code to load the JWT token in PowerShell
# Call teh Get-JWTToken method with the App ID and the App Private Key (normal string from env var or file contents, make sure there is no extra line ending at the end of it!).
function Build-Payload {
Param (
[string] $app_id
)
$iat = [Math]::Floor([decimal](Get-Date(Get-Date) -UFormat %s))
$payload = @{
"iat" = [int]$iat # issues at = now
@codification
codification / docker-compose-haproxy-with-logging.yml
Created February 22, 2017 22:12
Docker haproxy with http logging through syslog proxying to local port (for debugging)
version: "2"
services:
rsyslog:
image: jumanjiman/rsyslog
proxy:
image: haproxy
volumes:
- ./:/cfg
volumes_from:
- rsyslog