This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# compare-golden-events.py <old.json> <new.json> | |
import json | |
import sys | |
def missing(keys, dct): | |
r = [] | |
for key in keys: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Anonymize IPTABLES logs for documentation! | |
import os | |
import re | |
import sys | |
random_macs = set() | |
macs = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
REPO='user/repo' | |
PULL= # PULL_REQUEST_ID (1234) | |
USER_TO_DELETE='houndci-bot' | |
TOKEN=YOUR_GITHUB_API_TOKEN | |
headers = { 'Authorization': 'token ' + TOKEN } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"sync/atomic" | |
"fmt" | |
"os" | |
"strconv" | |
"syscall" | |
"time" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -x | |
set -e | |
SIZES=" | |
16,16x16 | |
32,16x16@2x | |
32,32x32 | |
64,32x32@2x | |
128,128x128 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
die() { | |
echo "error: $@" >&2 | |
exit 1 | |
} | |
test "$#" -gt 0 || die "Usage: $0 <package identifier>" | |
test "$(uname -s)" = "Darwin" || die "Must be run under macOS" | |
test $(id -u) -eq 0 || die "Must be root" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// +build windows | |
package main | |
import ( | |
"encoding/binary" | |
"encoding/hex" | |
"fmt" | |
"syscall" | |
"time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
/* | |
#include <stdlib.h> | |
#include <sys/xattr.h> | |
*/ | |
import "C" | |
import ( | |
"fmt" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
# Writes the body of a REST resource | |
# input is a list of <type> <name> variables, one per line: | |
# i.e: | |
# String nwDstAddress | |
# int nwDstLength | |
# UUID[] inPorts | |
# [...] | |
# helloWorld => HELLO_WORLD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package adriansr.test | |
import scala.util.control.NonFatal | |
import akka.actor.{Actor, ActorRef, ActorSystem, InvalidActorNameException, Props} | |
case class Test(name: String, retries: Int, delay: Long) | |
case class Create(iter: Long, cfg: Test) | |
case class Remove(iter: Long, actor: ActorRef, cfg: Test) |