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 | |
DEFER= | |
defer() { | |
DEFER="$*; ${DEFER}" | |
trap "{ $DEFER }" EXIT | |
} |
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
#include <unistd.h> | |
#include <stddef.h> | |
#include <stdio.h> | |
#include <sys/prctl.h> | |
#include <sys/syscall.h> | |
#include <linux/bpf.h> | |
#include <linux/seccomp.h> | |
#include <linux/filter.h> |
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
# | |
# sorted_json.rb | |
# Puppet module for outputting json in a sorted consistent way. I use it for creating config files with puppet | |
require 'json' | |
def sorted_json(json) | |
if (json.kind_of? String) | |
return json.to_json | |
elsif (json.kind_of? Array) |
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
# Export a single line | |
# | |
# == Parameters | |
# | |
# [*namevar*] | |
# Line of text to include in the file to build | |
# | |
# [*file*] | |
# The file the supplied line will be included in | |
# |