Skip to content

Instantly share code, notes, and snippets.

@xanarin
xanarin / gist:8acaedec209ca204fdf24d576c166ec5
Created June 29, 2024 21:03
Reliable systemd unit for docker-compose
[Unit]
Description=Docker service testing facility
After=network.target docker.service
[Service]
Restart=always
WorkingDirectory=/srv/tester
SyslogIdentifier=%i
ExecStart=/usr/bin/docker-compose up --no-color
@xanarin
xanarin / dc29_badge_signer.py
Created August 6, 2021 08:08
DEFCON 29 Badge Signer
#!/usr/bin/env python3
import argparse
import random
import sys
def gen_key():
random.seed()
key = ""
for idx in range(32):
key += hex(random.randrange(0, 16)).upper()[-1]
@xanarin
xanarin / treeMatcher.go
Last active September 16, 2016 02:20
An extension on the Equivalent Binary Trees - (https://tour.golang.org/concurrency/8) exercise from the Tour of Go Example on Goroutines - (https://tour.golang.org/concurrency/1).
package main
import "golang.org/x/tour/tree"
import "fmt"
// Walk walks the tree t sending all values
// from the tree to the channel ch.
func Walk(t *tree.Tree, ch chan int) {
// Recursive Approach
if (t.Left != nil) {