Skip to content

Instantly share code, notes, and snippets.

View gburd's full-sized avatar

Greg Burd gburd

View GitHub Profile
Return-Path: <3Mge3aQcKBHEcdgTeanVddVaT.RdbVgTVQjgS.bT@cases-outbound-prod.bounces.google.com>
Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41])
by slotpi14m52 (Cyrus 3.13.1-342-ga586d3c39-fm-20260310.001-ga586d3c3) with LMTPA;
Sun, 15 Mar 2026 15:23:33 -0400
X-Cyrus-Session-Id: slotpi14m52-1773602613-3461163-2-15217075183232939
X-Sieve: CMU Sieve 3.0
X-Spam-known-sender: no
X-Spam-sender-reputation: 951 (domain)
X-Spam-score: 0.0
X-Spam-hits: HTML_IMAGE_ONLY_28 0.726, HTML_MESSAGE 0.001, ME_SC_SENDERREP -100,
@gburd
gburd / .clang-tidy
Created November 20, 2024 15:45
Clang Tidy file for C99 (not C++) projects
---
# Configure clang-tidy for this project.
#
# Here is an explanation for why some of the checks are disabled:
#
# -readability-function-cognitive-complexity: too many false positives with
# clang-tidy-12. We need to disable this check in macros, and that setting
# only appears in clang-tidy-13.
#
# -bugprone-narrowing-conversions: too many false positives.
@gburd
gburd / skip_list.c
Created March 21, 2024 17:46 — forked from zhpengg/skip_list.c
skiplist implementation in c
/* Skip Lists: A Probabilistic Alternative to Balanced Trees */
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#define SKIPLIST_MAX_LEVEL 6
typedef struct snode {
int key;
@gburd
gburd / shell.txt
Created October 6, 2023 17:57
Symas OpenLDAP in a container (thanks Bitnami!)
```
docker buildx build --format docker --progress=plain --no-cache --rm --platform linux/x86_64 --load -t symas/openldap:latest .
mkdir /tmp/ldap
chmod 0777 /tmp/ldap
clear; sudo rm -rf /tmp/ldap/{.ldap_setup_complete,slapd.d,data}; docker run --rm -e BITNAMI_DEBUG=true --name=symas-openldap -p 1389:1389 -p 1639:1639 --volume /tmp/ldap:/bitnami/openldap --user 1001 symas/openldap:latest
```
gburd@floki ~/w/c/o/2/debian-11 (main)> sudo rm -rf /tmp/ldap/{.ldap_setup_complete,slapd.d,data}; docker run --rm -e BITNAMI_DEBUG=true --name=symas-openldap -p 1389:1389 -p 1639:1639 --volume /tmp/ldap:/bitnami/openldap --user 1001 symas/openldap:latest
17:55:10.09 INFO ==> ** Starting LDAP setup **
17:55:10.12 INFO ==> Validating settings in LDAP_* env vars
-- This is done once per database instance.
BEGIN;
CREATE SCHEMA partman;
CREATE EXTENSION pg_partman SCHEMA partman;
COMMIT;
BEGIN;
CREATE ROLE partman WITH LOGIN;
GRANT ALL ON SCHEMA partman TO partman;
@gburd
gburd / trace_decorator.py
Created February 15, 2023 15:33
Easy annotation to add OpenTelemetry into Python projects
## This file is a direct import of code from an MIT licensed project:
## digma-ai/opentelemetry-instrumentation-digma
##
## https://github.com/digma-ai/opentelemetry-instrumentation-digma/blob/main/LICENSE
## https://raw.githubusercontent.com/digma-ai/opentelemetry-instrumentation-digma/main/src/opentelemetry/instrumentation/digma/trace_decorator.py
##
import inspect
import types
from functools import wraps
@gburd
gburd / FlattenArray.ex
Created June 8, 2022 16:59
flatten array elixir
defmodule FlattenArray do
@doc """
Accept a list and return the list flattened without nil values.
## Examples
iex> FlattenArray.flatten([1, [2], 3, nil])
[1,2,3]
iex> FlattenArray.flatten([nil, nil])
[]
"""
@gburd
gburd / idea.vmoptions
Last active June 8, 2022 16:54
IntelliJ 2021.2.4 config
-Xms128m
-Xmx2048m
-XX:ReservedCodeCacheSize=512m
-XX:+UseG1GC
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:CICompilerCount=2
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-ea
-Dsun.io.useCanonCaches=false
@gburd
gburd / build-erlang.sh
Last active October 5, 2021 14:42 — forked from bryanhunter/build-erlang.sh
This script will install dependencies and then build and install erlang using kerl on Ubuntu
#!/bin/bash
# This script will install dependencies then build and install erlang using kerl
# Pull this file down, make it executable and run it with sudo
#
# wget https://gist.githubusercontent.com/bryanhunter/adbd9c8d9fb2f6366eee/raw/build-erlang.sh
# chmod u+x build-erlang.sh
# sudo ./build-erlang.sh
#
# Version: 17.1
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->