Skip to content

Instantly share code, notes, and snippets.

Avatar

Julien Breux JulienBreux

View GitHub Profile
@JulienBreux
JulienBreux / tracing-jaeger-ok.overlay.yaml
Last active Feb 7, 2022
Istio tracing Jaeger for ASM example
View tracing-jaeger-ok.overlay.yaml
---
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
meshConfig:
enableTracing: true
defaultConfig:
tracing:
sampling: 100
values:
@JulienBreux
JulienBreux / CKA.md
Last active Jul 1, 2021
CKA-07-2021 - Certification Kubernetes Administrator
View CKA.md

JSON Path

Get restart count from container name

$.status.containerStatuses[?(@.name == 'xxx-container')].restartCount

Print node addresses

$.items[*].status.addresses[?(@.type=="InternalIP")].address
@JulienBreux
JulienBreux / go1.16-golang.md
Created Feb 20, 2021
How to get Go (golang) 1.16 without wasting time
View go1.16-golang.md

How to get Go (golang) 1.16 without wasting time

go get golang.org/dl/go1.16
go1.16 download

go1.16 version

@JulienBreux
JulienBreux / read-access.sql
Last active Feb 18, 2020 — forked from oinopion/read-access.sql
How to create read only user in PostgreSQL
View read-access.sql
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT CONNECT ON DATABASE _database_name_ TO readaccess;
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO readaccess;
-- Grant access to future tables
View gist:7dea5c890dd39454ec61be05a99aa1e7
minikube_initialized=$(minikube profile list -o json | jq 'select(.valid != null) | .valid | map(select(.Name == "minikube")) | length')
View circle-tag.sh
TAG=$(echo ${CIRCLE_SHA1} | cut -c1-7)
if [ ! -z "${CIRCLE_TAG}" ]; then
TAG="${CIRCLE_TAG}"
fi
@JulienBreux
JulienBreux / Dockerfile
Created Aug 19, 2019
Speed Nginx Docker (for tests)
View Dockerfile
FROM nginx:1-alpine
COPY ./src/index.html /usr/share/nginx/html
COPY ./etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
@JulienBreux
JulienBreux / index-mgd.go
Created Apr 16, 2019
mgo vs mongo-go-driver
View index-mgd.go
import (
"go.mongodb.org/mongo-driver/mongo"
mongooptions "go.mongodb.org/mongo-driver/mongo/options"
)
// createSlugIndex creates the slug index in Mongo collection
func createSlugIndex(ctx context.Context, c mongo.Collection) (err error) {
ptrTrue := true
ptrSlug := "slug"
_, err = c.Indexes().CreateMany(ctx, []mongo.IndexModel{
@JulienBreux
JulienBreux / .dotenv.sh
Last active Sep 26, 2018
source ~/.dotenv.sh
View .dotenv.sh
cd()
{
debug()
{
if [ $DOTENVSH_DEBUG = true ]; then
echo $1
fi
}
loadenv()
View keybase.md

Keybase proof

I hereby claim:

  • I am JulienBreux on github.
  • I am julienbreux (https://keybase.io/julienbreux) on keybase.
  • I have a public key whose fingerprint is 28FD 65AB 03BB 4A67 331E FBDE C71D 9FA1 0BD0 23FA

To claim this, I am signing this object: