Skip to content

Instantly share code, notes, and snippets.

View giovanni-bertoncelli's full-sized avatar

Giovanni Bertoncelli giovanni-bertoncelli

View GitHub Profile
#!/bin/bash
aws_key=$(cat ~/.aws/credentials | grep -A 2 default | grep key_id | awk '{print $3}')
aws_secret=$(cat ~/.aws/credentials | grep -A 2 default | grep secret | awk '{print $3}')
kubectl create secret generic aws-credentials \
--from-literal key=$aws_key \
--from-literal secret=$aws_secret
@giovanni-bertoncelli
giovanni-bertoncelli / chartjs-gauge-template
Created December 13, 2022 08:53
ChartJS@^3 Gauge chart template link
Hi,
if you are like me and you need a chartjs gauge chart (with chartjs@^3) then this template may be useful to you:
https://codesandbox.io/s/chartjs-gauge-template-k9jlgw?file=/src/index.js
It is only a starting boilerplate, pretty complete tough, that you can use in order to create a gauge controller and customize the resulting chart as you want.
@giovanni-bertoncelli
giovanni-bertoncelli / Commonly-used-proxy-forwarded-for-headers.md
Created January 20, 2023 11:14
Commonly used proxy forwarded for headers

MDN: Forwarded: for=192.0.2.60;proto=http;by=203.0.113.43

MDN: X-Forwarded-For: 203.0.113.195

NGINX: X-Real-IP: 198.51.100.17

X-Client-IP: 198.51.100.17

True-Client-IP: 198.51.100.17