Skip to content

Instantly share code, notes, and snippets.

Avatar

Eric Stroczynski estroz

  • Red Hat
  • San Francisco, CA
View GitHub Profile
@estroz
estroz / kuttl-rbac.yaml
Last active Aug 6, 2020
RBAC required to run a basic kuttl suite
View kuttl-rbac.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: scorecard-kuttl
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: scorecard-kuttl
roleRef:
View memcached-index-server.yaml
apiVersion: v1
kind: Pod
metadata:
name: memcached-operator-index-server
namespace: default
spec:
containers:
- command:
- /bin/bash
- -c
@estroz
estroz / .sh
Created Sep 13, 2019
delete_old_branches.sh
View .sh
git branch -vv | gawk '{print $1,$3,$4}' | grep -E '\[origin/.+: gone\]' | gawk '{print $1}' | xargs git branch -D
View clean_medium_html.go
package main
import (
"bytes"
"io/ioutil"
"log"
"os"
"strings"
"golang.org/x/net/html"
@estroz
estroz / pdf-quality.sh
Created Dec 8, 2018
PFD quality conversion on linux
View pdf-quality.sh
# From https://askubuntu.com/questions/113544/how-can-i-reduce-the-file-size-of-a-scanned-pdf-file/256449#256449
gs -sDEVICE=pdfwrite \
-dCompatibilityLevel=1.4 \
# -dPDFSETTINGS=/screen lower quality, smaller size. (72 dpi)
# -dPDFSETTINGS=/ebook for better quality, but slightly larger pdfs. (150 dpi)
# -dPDFSETTINGS=/prepress output similar to Acrobat Distiller "Prepress Optimized" setting (300 dpi)
# -dPDFSETTINGS=/printer selects output similar to the Acrobat Distiller "Print Optimized" setting (300 dpi)
# -dPDFSETTINGS=/default selects output intended to be useful across a wide variety of uses, possibly at the expense of a larger output file
-dPDFSETTINGS=/ebook \
-dNOPAUSE -dQUIET -dBATCH \
View terraform-plan-debug-output.txt
This file has been truncated, but you can view the full file.
2017/07/14 13:29:25 [INFO] Terraform version: 0.9.6 85e0979c6af6a15345c9131e4478ba712bb3c21d
2017/07/14 13:29:25 [INFO] Go runtime version: go1.8
2017/07/14 13:29:25 [INFO] CLI args: []string{"/usr/local/bin/terraform", "plan", "-var-file=terraform.tfvars", "platforms/aws"}
2017/07/14 13:29:25 [DEBUG] Detected home directory from env var: /home/estro
2017/07/14 13:29:25 [DEBUG] Detected home directory from env var: /home/estro
2017/07/14 13:29:25 [DEBUG] Attempting to open CLI config file: /home/estro/.terraformrc
2017/07/14 13:29:25 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2017/07/14 13:29:25 [DEBUG] Detected home directory from env var: /home/estro
2017/07/14 13:29:25 [INFO] CLI command args: []string{"plan", "-var-file=terraform.tfvars", "platforms/aws"}
@estroz
estroz / tag-route53-hosted-zones.sh
Created Jun 23, 2017
Tag route53 hosted zones if they don't have a specific tag key
View tag-route53-hosted-zones.sh
#!/usr/bin/env bash
## Tags route53 hosted zones not already tagged with the specified key(s)
# Example tag file:
# [
# {
# "Key": "expirationDate",
# "Value": "2017-06-22"
# }
# ]
You can’t perform that action at this time.