Skip to content

Instantly share code, notes, and snippets.

View imranismail's full-sized avatar

Imran Ismail imranismail

View GitHub Profile
@imranismail
imranismail / README.md
Last active August 1, 2024 23:38
An AWK script that supresses terraform helm_release metadata attributes

Motivation

The terraform helm provider is rather noisy printing unnecessary metadata in the plan output making it hard to review changes. This awk script redacts unnecessary field from the output to make it easier to review.

Usage

terraform plan -out plan.tfplan | awk -f supress_helm_release.awk
terraform show -no-color plan.tfplan | awk -f supress_helm_release.awk
@imranismail
imranismail / README.md
Last active September 19, 2023 01:21
README.md
flowchart BT
    Jedan[Jedan\nChristmas] -->|KomentarA| Dva[Neštonešto]
    Dva --> Tri{Let me think}
    Tri -->|Broj4| Četiri[LeKomentar]
    Tri -->|PremaDva| Pet[Tekst5]
    Tri -->|Tri| Šest[fa:fa-car Car]

Pet[<img src='https://iconscout.com/ms-icon-310x310.png' width='40' /> \nasd]
@imranismail
imranismail / deployment.yaml
Last active August 24, 2023 11:12
Using Kustomize with Terraform
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
selector:
matchLabels:
app: myapp
template:
metadata:
@imranismail
imranismail / mg.sh
Created March 31, 2023 08:24
Add argocd manifest generation path to all applications
#! /usr/bin/env bash
# This script is used to patch all argocd apps in a cluster
# the patch will add a new annotation to all apps
# the annotation will be used to prevent the app from being refreshed unnecessarily
# the following annotation will be added to all apps
# argocd.argoproj.io/manifest-generate-paths: .
set -euo pipefail
@imranismail
imranismail / README.md
Last active January 5, 2022 06:54
bff jsonresource param passing

Start BFF container

$ docker run --rm -it -v $(pwd)/config.yml:/srv/config.yml ghcr.io/imranismail/bff:v0.5.0

Send a request using the httpbin anything endpoint

$ curl 'http://localhost:5000/params/1' -H 'access-token: this-is-an-access-token'
# Allow neighbor cache entries to expire even when the cache is not full
net.ipv4.neigh.default.gc_thresh1 = 0
net.ipv6.neigh.default.gc_thresh1 = 0
# Avoid neighbor table contention in large subnets
net.ipv4.neigh.default.gc_thresh2 = 15360
net.ipv6.neigh.default.gc_thresh2 = 15360
net.ipv4.neigh.default.gc_thresh3 = 16384
net.ipv6.neigh.default.gc_thresh3 = 16384
@imranismail
imranismail / ssz_data_manager_observer.js
Last active January 20, 2020 23:51 — forked from syaifulsz/ssz_data_manager_observer.js
Simple ES Javascript Plugin for Data Manager & Observer (Single state of truth)
class DataManager {
_listeners = [];
constructor(initialData) {
this._data = initialData;
}
dispatch = (data) => {
this._data = data;
@imranismail
imranismail / README.md
Last active October 3, 2019 07:49
Client Credentials Grant

token_endpoint_auth_method == client_secret_post

method: POST
path: /oauth2/token
accept: application/json
content-type: application/x-www-form-urlencoded
---
grant_type: string
code: string

Keybase proof

I hereby claim:

  • I am imranismail on github.
  • I am imranismail (https://keybase.io/imranismail) on keybase.
  • I have a public key ASBLClmsBnZA7O-DyJ_LpLeIud7cHMMK153ZGO-Hp_dHiwo

To claim this, I am signing this object:

@imranismail
imranismail / README.md
Last active May 11, 2019 16:19
API Gateway Comparison
- Ambassador Traefik Kong Gloo
Backend Envoy Traefik Nginx Envoy
Storage K8S KV Store (Consul/ETCD/ZooKeeper/BoltDB) Postgres K8S
Authentication Forward Auth Forward Auth, Basic, Digest Plenty of options Paid Option
Matchers Host, Method, Header, Path Host, Method, Header, Path, Query Host, Method, Header, Path Host, Method, Header, Path, Query
Config Native Native Native Native
Service Mesh Integration Istio No Istio Istio
Circuit Breaker Yes Yes Yes Yes
Tracing OpenTracing OpenTracing OpenTracing OpenTracing