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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Net::SSLeay; | |
# Check for the correct number of command-line arguments | |
unless (@ARGV == 3) { | |
die "Usage: perl $0 <encrypted_key_file> <passphrase_file> <decrypted_key_file>\n"; | |
} |
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
for x in /proc/*/cmdline; do echo -n "${x#/proc/}: "; cat $x; echo; done |
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
user nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log info; | |
pid /run/nginx.pid; | |
include /usr/share/nginx/modules/*.conf; | |
env RELAY_HOST; | |
env RELAY_PORT; |
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
#!/usr/bin/env python3 | |
# * finds all inline style and script elements in an html file | |
# exports the code into a file (ie. filename.css, filename.js) | |
# removes the original tag from the html | |
# * replaces inline styles and scripts with tags in the header | |
# sourcing the new external code | |
# disable tracebacks |
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 | |
set -eo nounset | |
export GNUPGHOME="$(mktemp -d)" | |
trap 'cleanup' EXIT | |
cleanup() { rm -Rf "$GNUPGHOME" ; } | |
export NAME_REAL="Signing Key" |
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 requests | |
def disable_request_verification(): | |
requests.urllib3.disable_warnings() | |
old_init = requests.Session.__init__ | |
def new_init(self, *k, **kw): | |
old_init(self, *k, **kw) | |
self.verify = False |
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
#!/usr/bin/env python3 | |
import collections | |
import asyncio | |
import sys | |
class AsyncSubProcess: | |
def __init__(self, program, *args, env={}, output=True, cwd=None): | |
self.proc = None |
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
# syntax=docker/dockerfile:1.6 | |
ARG BUILD_OS_TAG | |
FROM alpine:${BUILD_OS_TAG} as build | |
ARG BUILD_OS_TAG | |
RUN apk add --no-cache alpine-sdk doas \ | |
&& echo 'permit nopass :wheel' >> /etc/doas.conf | |
RUN adduser -D build \ |
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
ifeq (${MAKELEVEL},0) | |
export SCRATCH := $(shell mktemp -d ./.tmp_XXXXXXXX) | |
$(info Launching clean up task for ${SCRATCH}) | |
$(shell bash -c "set -m ; trap 'rm -rvf ${SCRATCH};' EXIT; lsof -p $$PPID +r 1;" </dev/null >/dev/null 2>/dev/null & disown) | |
endif |
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
require 'rspec/core' | |
namespace :check do | |
desc "Check to ensure defined puppet code has been described in spec\n(defaults: coverage=100)" | |
task :spec_described, [:coverage] do |_task, args| | |
args.with_defaults(coverage: '100') | |
def pluralize(string) | |
string.end_with?('s') ? "#{string}es" : "#{string}s" | |
end |
NewerOlder