Skip to content

Instantly share code, notes, and snippets.

View slmingol's full-sized avatar
:octocat:
codz

Sam Mingo slmingol

:octocat:
codz
View GitHub Profile
@slmingol
slmingol / git-crypt-list-keys.sh
Created June 5, 2019 13:51 — forked from acobaugh/git-crypt-list-keys.sh
List git-crypt gpg keys
for key in .git-crypt/keys/default/0/* ; do gpg -k $(echo $(basename $key) | sed -e 's/.gpg//') ; done ;
@slmingol
slmingol / aws.md
Created May 22, 2019 16:00 — forked from colinvh/aws.md
AWS Region Names

Alternative naming schemes for AWS regions

Purpose

The intent is to define terse, standards-supported names for AWS regions.

Schemes

@slmingol
slmingol / watchfiles.md
Created April 22, 2019 12:02 — forked from thiagoh/ watchfiles.md
watchfiles: Watch multiple files and execute bash commands as file changes occur

watchfiles

  • author: Thiago Andrade thiagoh@gmail.com
  • license: GPLv3
  • description:
  • watches the given paths for changes
  • and executes a given command when changes occur
  • usage:
  • watchfiles <paths...>
# place in /etc/yum/pluginconf.d/artifactory.conf
[main]
enabled=1
@slmingol
slmingol / evident_io_terraform.tf
Last active March 27, 2019 18:00 — forked from chrisguitarguy/evident_io_terraform.tf
Terraform configuration for an Evident.io IAM Role
variable "evident_account" {
type = "string"
}
variable "evident_id" {
type = "string"
}
data "aws_iam_policy_document" "evident" {
statement {
What exactly is "iowait"?
To summarize it in one sentence, 'iowait' is the percentage
of time the CPU is idle AND there is at least one I/O
in progress.
Each CPU can be in one of four states: user, sys, idle, iowait.
Performance tools such as vmstat, iostat, sar, etc. print
out these four states as a percentage. The sar tool can
print out the states on a per CPU basis (-P flag) but most
@slmingol
slmingol / SSLPoke.java
Created March 6, 2019 01:44 — forked from amarula-git/SSLPoke.java
Test of java SSL / keystore / cert setup. Check the commet #1 for howto.
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services
*/
public class SSLPoke {
public static void main(String[] args) {
@slmingol
slmingol / decode_aws_auth_fail_msg.sh
Created March 1, 2019 18:19 — forked from xiongchiamiov/why.sh
Use this when Amazon gives you an "Encoded authorization failure message" and you need to turn it into something readable. If you only get a request id... you're out of luck.
#!/bin/bash
# REF: https://gist.github.com/xiongchiamiov/b0ef0251813625307371d0e11e131759#file-why-sh
# REF: https://bcb.github.io/pipe-jq-to-less
function decode-authorization-failure-message {
if [ $# -ne 1 ] || [ "$1" = -h ] || [ "$1" = --help ]; then
cat <<'EOT'
Usage: decode-authorization-failure-message <message>