Skip to content

Instantly share code, notes, and snippets.

View gerbal's full-sized avatar

Grant McLendon gerbal

  • Madison
  • 00:38 (UTC -05:00)
View GitHub Profile
@gerbal
gerbal / iex-observe.sh
Last active September 14, 2018 15:47 — forked from AndrewDryga/erl-observe.sh
Script for connecting Erlang Observer to remote node hosted in Kubernetes
#!/bin/bash
# This script provides easy way to debug remote Erlang nodes that is running in a kubernetes cluster.
# Usage: ./erl-observe.sh -l app=my_all -n default -c erlang_cookie
#
# Don't forget to include `:runtime_tools` in your mix.exs application dependencies.
set -e
# Trap exit so we can try to kill proxies that has stuck in background
function cleanup {
echo " - Stopping kubectl proxy."
diff --git a/incubator/patroni/Chart.yaml b/incubator/patroni/Chart.yaml
index 42a00726..586c9aab 100644
--- a/incubator/patroni/Chart.yaml
+++ b/incubator/patroni/Chart.yaml
@@ -1,7 +1,7 @@
name: patroni
description: 'Highly available elephant herd: HA PostgreSQL cluster.'
-version: 0.8.1
-appVersion: 1.4-p7
+version: 0.11.0
<?xml version="1.0" encoding="utf-8"?>
<ModList>
<Name>Immersion</Name>
<modIds>
<li>1544705976</li>
<li>Core</li>
<li>1668983184</li>
<li>1845423808</li>
<li>1684944322</li>
<li>1780241645</li>
---
# Archive of http://www.columbia.edu/~alan/schemas/common/jsonapi.yaml
openapi: 3.0.2
info:
version: 1.0.0
title: "{json:api} Specification"
description: >
An include file to define the [{json:api} 1.0 specification](http://jsonapi.org/format).
N.B. I've got some confusion going on between a validating a jsonapi schema and defining one!
@gerbal
gerbal / copy_roles.bash
Created May 6, 2021 19:34
Copy vault roles between vault auth providers
first_auth=kubernetes
second_auth=kubernetes_two
roles=$(VAULT_FORMAT=json vault list "auth/$first_auth/role" | jq -r ".[]")
for role in $roles; do
vault read "auth/$first_auth/role/$role" -format=json | jq '.data' | vault write "auth/$second_auth/role/$role" -
done
@gerbal
gerbal / encoder-disaggreement.md
Last active January 14, 2022 11:41
Chargebee Nested Value encoding

I've been working on improving the Elixir package for interacting with the Chargebee API and have encountered some inconsistency in how the different libraries construct POST request parameters

When I try to serialize a nested nested lists, as one would use when creating coupons, the serializers produce differing output depending on the library implementation.

Chargebee-Ruby produces the following

ChargeBee::Util.serialize({item_constraints: [{item_price_ids: ['id1']}]})

=&gt; {"item_price_ids[0]"=&gt;"id1"}
@gerbal
gerbal / bulk-rename.sh
Created October 23, 2023 18:46
bulk-rename.sh - simple bash script to rename a module or class accross a whole project
#!/bin/bash
# Bulk Rename Script
# This script helps to refactor code by renaming occurrences of a module name or file name across the project.
# It respects existing naming conventions, i.e., snake_case and PascalCase, during the renaming process.
#
# Usage: ./bulk-rename.sh <from> <to> [-v|--verbose] [-d|--ignore-dirs]
#
# Options:
# -v, --verbose Print detailed logs of the renaming process.