Skip to content

Instantly share code, notes, and snippets.

Avatar

Rinor Maloku rinormaloku

View GitHub Profile
View jq-tricks-that-you-cannot-remember
# go and find a deeply nested key with the name accessLog
jq '.. |."accessLog"? | select(. != null)'
View jq-tricks-that-you-cannot-remember
# go and find a deeply nested key with the name accessLog
jq '.. |."accessLog"? | select(. != null)'
View subset rate dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
View subset rate dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
View subset rate dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
View secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: secretname
data:
secretKey: YWRtaW4K
secret: xxxxK
type: Opaque
View jwks.yaml
{ "keys":[ {"e":"AQAB","kid":"CU-ADJJEbH9bXl0tpsQWYuo4EwlkxFUHbeJ4ckkakCM","kty":"RSA","n":"zl9VRDbmVvyXNdyoGJ5uhuTSRA2653KHEi3XqITfJISvedYHVNGoZZxUCoiSEumxqrPY_Du7IMKzmT4bAuPnEalbY8rafuJNXnxVmqjTrQovPIerkGW5h59iUXIz6vCznO7F61RvJsUEyw5X291-3Z3r-9RcQD9sYy7-8fTNmcXcdG_nNgYCnduZUJ3vFVhmQCwHFG1idwni8PJo9NH6aTZ3mN730S6Y1g_lJfObju7lwYWT8j2Sjrwt6EES55oGimkZHzktKjDYjRx1rN4dJ5PR5zhlQ4kORWg1PtllWy1s5TSpOUv84OPjEohEoOWH0-g238zIOYA83gozgbJfmQ"}]}
@rinormaloku
rinormaloku / named-arguments.sh
Last active Jul 8, 2020
named arguments sample for bash
View named-arguments.sh
#!/bin/bash
#set -e
help() {
cat <<EOF
A minimalistic script to showcase named arguments in bash.
The following flags are required.
--req-arg If required arg is not specified execution is interrupted.
@rinormaloku
rinormaloku / mod-service-role-binding.yaml
Created Jan 13, 2019
[Moderator Service Role Binding] for the article series Intro to Istio https://rinormaloku.com/istio-an-introduction/
View mod-service-role-binding.yaml
apiVersion: "rbac.istio.io/v1alpha1"
kind: ServiceRoleBinding
metadata:
name: mod-user-binding
namespace: default
spec:
subjects:
- properties:
request.auth.claims[https://sa.io/group]: "Moderators"
roleRef:
@rinormaloku
rinormaloku / mod-service-role.yaml
Last active Jan 13, 2019
[Moderator service role] for the article series Intro to Istio https://rinormaloku.com/istio-an-introduction/
View mod-service-role.yaml
apiVersion: "rbac.istio.io/v1alpha1"
kind: ServiceRole
metadata:
name: mod-user
namespace: default
spec:
rules:
- services: ["*"]
paths: ["*"]
methods: ["*"]
You can’t perform that action at this time.