Skip to content

Instantly share code, notes, and snippets.

@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
@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/
       
@jmhobbs
jmhobbs / Dockerfile
Created December 27, 2018 22:02
Google Cloud Build Secret Environment Demo
FROM busybox
ARG THE_SECRET
RUN echo "::${THE_SECRET}::"
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+
@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
@alexellis
alexellis / k8s-pi.md
Last active April 11, 2024 14:17
K8s on Raspbian
@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
# _ _____ _
# (_) | __ \ (_)
# _ __ _ | |__) | ___ ___ _ _ __ ___ ___
# | | / _` | | _ / / _ \ / __|| || '_ \ / _ \/ __|
# | || (_| | | | \ \| __/| (__ | || |_) || __/\__ \
@chrismccord
chrismccord / upgrade.md
Last active April 7, 2023 12:03
Phoenix 1.2.x to 1.3.0 Upgrade Instructions

If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8

To use the new phx.new project generator, you can install the archive with the following command:

$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez

Bump your phoenix dep

Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs:

@ipbastola
ipbastola / jq to filter by value.md
Last active April 25, 2024 17:14
JQ to filter JSON by value

JQ to filter JSON by value

Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'

Example: To get json record having _id equal 611

cat my.json | jq -c '.[] | select( ._id | contains(611))'

Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)