Skip to content

Instantly share code, notes, and snippets.

@henryiii
henryiii / git-all.py
Last active July 26, 2017 10:02
Fast repository status for repos in git folder, Python Rewrite.
#!/usr/bin/env python3
from plumbum import local, cli, FG, BG, TF, ProcessExecutionError, colors
from plumbum.cmd import tput, git
from contextlib import contextmanager
from functools import partial
# This can be hard coded to a repo location, or cwd, etc.
# REPOLOC = local.path(__file__) / '..'
REPOLOC = local.env.home / 'git'
@kzap
kzap / terraform-app.sh
Created June 28, 2016 15:54
Wrapper for terraform that lets you specify an environment and calls an $ENV.tfvars file, uses a $ENV.tfstate file and sets the env variable
#!/bin/bash
#
# terraform-app
#
# This to terraform the servers for the Galleon App
# By storing the date now, we can calculate the duration of provisioning at the
# end of this script.
start_seconds="$(date +%s)"
@cheeseplus
cheeseplus / workaround.md
Last active July 16, 2019 21:45
Chef Infra License Errors in Test-kitchen and Packer

If you're getting errors like:

       +---------------------------------------------+
            Chef License Acceptance
       
       Before you can continue, 2 product licenses
       must be accepted. View the license at
       https://www.chef.io/end-user-license-agreement/
       
@mitchellhenke
mitchellhenke / upgrade.md
Last active September 2, 2019 15:48
Sentry 6.x to 7.x Upgrade Guide

Bump your sentry dep

def deps do
  [
    {:sentry, "~> 7.0"},
  ]
end
@sdorsett
sdorsett / notes.txt
Last active April 16, 2020 11:51
Using clair-scanner to scan a local docker image
### make sure go is installed
Stans-MacBook-Pro:clair-scanner standorsett$ go version
go version go1.8.3 darwin/amd64
Stans-MacBook-Pro:clair-scanner standorsett$
### make sure GOPATH is defined and $GOPATH/bin is added to $PATH
Stans-MacBook-Pro:clair-scanner standorsett$ cat ~/.bash_profile
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH
require 'base64'
require 'plist'
module Chef::Provider::User::DsclMojaveUserExtensions
# new for 10.14+
def mac_osx_version_greater_than_10_13?
Gem::Version.new(node['platform_version']) > Gem::Version.new('10.13.99')
end
# updated for 10.14+
@jmhobbs
jmhobbs / Dockerfile
Created December 27, 2018 22:02
Google Cloud Build Secret Environment Demo
FROM busybox
ARG THE_SECRET
RUN echo "::${THE_SECRET}::"
@mik-laj
mik-laj / convert.py
Last active March 12, 2021 16:29
Helm-unittest to Python unittest migration script. Part of: https://github.com/apache/airflow/pull/11827
import codecs
import re
from os import listdir
from os.path import isfile, join, dirname, abspath, basename
from typing import Any, Optional, Set, Dict
import sys
import black
from jinja2 import Template
import jinja2
@petrkohut
petrkohut / howto.md
Last active October 20, 2021 08:57
How to have redis-cli and psql installed on machine using Docker

How to install redis-cli and psql client on your machine with Docker

Preparing docker images

We will use minimalistic Linux distribution called Alpine (5MB)

Dockerfile of redis-cli

FROM alpine:latest
RUN apk --update add redis
@textarcana
textarcana / jq_recipes.sh
Created March 25, 2017 02:58
JQ Cookbook Examples by Noah Sussman
#!/usr/bin/env bash
set -x
# jq Recipes
# _ _____ _
# (_) | __ \ (_)
# _ __ _ | |__) | ___ ___ _ _ __ ___ ___
# | | / _` | | _ / / _ \ / __|| || '_ \ / _ \/ __|
# | || (_| | | | \ \| __/| (__ | || |_) || __/\__ \