Skip to content

Instantly share code, notes, and snippets.

View pauldraper's full-sized avatar

Paul Draper pauldraper

View GitHub Profile
@pauldraper
pauldraper / BUILD.bazel
Last active November 18, 2023 02:22
Bazel pkg_runfiles and pkg_executable
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
load(":rules.bzl", "pkg_executable")
#
# Package executable :bin to tar
#
pkg_executable(
name = "pkg",
bin = ":bin",
@gene1wood
gene1wood / all_aws_managed_policies.json
Last active April 4, 2024 18:11
A list of all AWS managed policies and they're policy documents as well as a short script to generate the list
This file has been truncated, but you can view the full file.
{
"APIGatewayServiceRolePolicy": {
"Arn": "arn:aws:iam::aws:policy/aws-service-role/APIGatewayServiceRolePolicy",
"AttachmentCount": 0,
"CreateDate": "2019-10-22T18:22:01+00:00",
"DefaultVersionId": "v6",
"Document": {
"Statement": [
{
@nlochschmidt
nlochschmidt / travis-run-tests.sh
Last active August 29, 2015 14:05
Filter output from sbt to reduce length of CI build log
#!/usr/bin/env bash
# Licensed under the Apache License, Version 2.0
# Adapted from https://github.com/paulp/psp-std/blob/master/bin/test
runTests () {
sbt test || exit 1
echo "[info] $(date) - finished sbt test"
}
stripTerminalEscapeCodes () {
@jeremiahsnapp
jeremiahsnapp / MITM -SSL-Proxies.md
Last active November 14, 2023 07:48
Man In The Middle (MITM) SSL Proxies - Simple ways to see traffic between an SSL server and client in clear text.

HTTP(S) specific MITM SSL Proxies

mitmproxy

mitmproxy is an excellent console app written in Python.

It is easy to use on Linux and OS X.

Use brew install mitmproxy to install it on OS X.

@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active April 23, 2024 19:14
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'