Skip to content

Instantly share code, notes, and snippets.

View gforien's full-sized avatar

Gabriel Forien gforien

  • INSA Lyon
  • Lyon, France
  • 11:41 (UTC +02:00)
View GitHub Profile
https://excalidraw.com/#json=yJrUl8O2gxvkYy7FAdb_I,F-oeOZmIHy-RN7vape4K8Q
@gforien
gforien / k8s-svc-annotations.md
Created April 25, 2022 12:53 — forked from mgoodness/k8s-svc-annotations.md
AWS ELB-related annotations for Kubernetes Services (as of v1.12.0)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
  • service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags (comma-separated list of key=value)
  • service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)
  • service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)
@gforien
gforien / aws_service_principals.txt
Last active April 25, 2022 12:52 — forked from shortjared/list.txt
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@gforien
gforien / clear-cache.Dockerfile
Last active November 18, 2021 13:26
Install packet in a docker image, and clear cache afterwards ✨
# for Debian-based images (buster, bullseye, etc)
FROM debian
RUN apt-get update &&\
apt-get install ncdu &&\
rm -rf /var/lib/apt/lists/*
# for Alpine-based images
FROM alpine
RUN apk add --no-cache ncdu
@gforien
gforien / count-all-ec2-commands.ps1
Last active November 18, 2021 13:46
Get a count of all AWS EC2 commands
# PS> aws ec2 help | write
$commands = @(
@{n='accept-transit-gateway-multicast-domain-associations'}, @{n='accept-transit-gateway-peering-attachment '},
@{n='accept-transit-gateway-vpc-attachment'}, @{n='accept-vpc-endpoint-connections'},
@{n='accept-vpc-peering-connection'}, @{n='advertise-byoip-cidr'},
@{n='allocate-address'}, @{n='allocate-hosts'},
@{n='apply-security-groups-to-client-vpn-target-network'}, @{n='assign-ipv6-addresses'},
@{n='assign-private-ip-addresses'}, @{n='associate-address'},
@{n='associate-client-vpn-target-network'}, @{n='associate-dhcp-options'},
@{n='associate-enclave-certificate-iam-role'}, @{n='associate-iam-instance-profile'},
@gforien
gforien / install_docker_on_ec2.sh
Last active January 25, 2022 18:39
Install Docker on EC2 Amazon Linux 2
# docker
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
# logout, or execute 'sudo newgrp docker'
sudo curl https://raw.githubusercontent.com/docker/docker-ce/master/components/cli/contrib/completion/bash/docker -o /etc/bash_completion.d/docker
sudo vim /etc/bash_completion.d/docker
# add 'd' on last line
# logout
@gforien
gforien / git-pull-all-remote-branches.ps1
Last active September 6, 2021 11:25
Git pull all remote branches (powershell)
git branch -r | ?{$_ -notlike '*->*'} | %{$_ -replace "\s", ""} | %{ git branch --track ($_ -replace "origin/", "") $_}
git fetch --all
git pull --all
@gforien
gforien / delete-yt-comments.js
Last active September 7, 2021 18:42
Delete all my youtube comments
// on https://myactivity.google.com/page?page=youtube_comments
let i = 0
let total = document.querySelectorAll("div[role=list] button").length
let recurse = () => {
setTimeout(() => {
let a = document.querySelectorAll("div[role=list] button")
let b = document.querySelectorAll("div[role=list] h2")[i].innerHTML.padEnd(13)
if (a[i]) {
@gforien
gforien / app.js
Last active March 28, 2021 16:28
Basic NodeJS Express boilerplate
require('dotenv-safe').config();
// dependencies
const express = require('express');
const bodyParser = require('body-parser');
const cors = require('cors');
// app
const app = express();