Skip to content

Instantly share code, notes, and snippets.

View coxley's full-sized avatar
:shipit:

Codey Oxley coxley

:shipit:
View GitHub Profile
@coxley
coxley / read_zstd_dict.go
Created December 6, 2023 04:57
Read zstd dict
package main
import (
"bytes"
"encoding/binary"
"fmt"
)
// Little Endianed
var ZstdMagic = []byte("\x28\xB5\x2F\xFD")
@coxley
coxley / postgres_test.go
Created July 18, 2024 15:17
Postgres test isolation helper
package pgtest
import (
"context"
"fmt"
"strings"
"sync"
"testing"
"github.com/docker/go-connections/nat"
@coxley
coxley / slack-pagerduty-oncall.py
Created September 25, 2024 14:53 — forked from tr-fteixeira/slack-pagerduty-oncall.py
Updates a Slack User Group with People that are on call in PagerDuty (updated for slack_sdk after previous auth method was deprecated, changed user lookup on slack). Based on: https://gist.github.com/markddavidoff/863d77c351672345afa3fd465a970ad6
"""
Script to update on-call groups based on pagerduty escalation policies
From: https://gist.github.com/markddavidoff/863d77c351672345afa3fd465a970ad6
Slack permissions required:
- Installer must be able to update user groups.
- usergroups:read
- usergroups:write
- users:read
- users:read.email