Skip to content

Instantly share code, notes, and snippets.

View mikamboo's full-sized avatar
🏠
Working from home

Michaël P.O. mikamboo

🏠
Working from home
View GitHub Profile
@mikamboo
mikamboo / Dockerfile
Last active March 8, 2020 10:57
Nginx Ingress : Basic Auth
## Build this image to create htpasswd
##
## docker build -t your-org/htpasswd .
FROM alpine
RUN apk add --update apache2-utils \
&& rm -rf /var/cache/apk/*
ENTRYPOINT ["htpasswd", "-Bbn"]
@mikamboo
mikamboo / README.md
Last active February 22, 2020 14:55
Puppeeter demo

Puppeeter

Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol. Puppeteer runs headless by default, but can be configured to run full (non-headless) Chrome or Chromium.

Install

Init sample scrapping project

@mikamboo
mikamboo / README.md
Last active September 17, 2024 20:32 — forked from steimntz/create_user_for_namespace.sh
Kubernetes : Create Service Account with permission for a specific namespace + Generate KUBECONFIG

Create KUBECONFIG limited to specific namespace

  • create_user_for_namespace.sh: Create $namespace-user ServiceAccount with full access to specified namespace and get KUBECONFIG
  • kubeconfig-generator.sh : Generate the KUBECONFIG of an existing sericeaccout + namespace

Ex : Create Gitlab-user on gitlab namespace

GIST_URL=https://gist.githubusercontent.com/mikamboo/5e20ea4a0aef8289e40f62844dec7bc8
curl $GIST_URL/raw/bb5ba7e3cc2b1e7be0006f7a2bc3d0f5d73958ec/create_user_for_namespace.sh | bash -s gitlab
@mikamboo
mikamboo / README.md
Last active April 13, 2020 12:38
Kubernetes : Ingress for url validation route

Ingress temporary route

Use case : Quickly create a location /loaderio-xxxxxxxx with text response loaderio-xxxxxxxx.

Eg : curl http://clouder.my-domain.io/clouder.my-domain.io must return :

loaderio-xxxxxxxx
@mikamboo
mikamboo / README.md
Last active February 16, 2020 09:03
K8S : AWS S3 Backup Cron Jobs

K8S to S3 Backup

Sample cron job resources to backup a simple wordpresse installation.

Prerequists

  • A docker image including ASW-CLI
  • AWS Credentials to access your AWS S3 bucket

Backup jobs

@mikamboo
mikamboo / configmap.yaml
Last active February 13, 2020 09:47
S8K static web nginx website deployment
apiVersion: v1
kind: ConfigMap
metadata:
name: clouder.io
data:
index.html: |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
@mikamboo
mikamboo / Dockerfile
Last active April 30, 2020 13:10
Kubernet Pod initialisation container using python3 aws-cli
# company/python3-aws docker image
FROM python:3.7-alpine
RUN pip3 --no-cache install awscli awscli-plugin-endpoint
ENTRYPOINT ["aws"]
# docker build -t company/awscli .
@mikamboo
mikamboo / code-server-secret-tpl.yaml
Last active February 13, 2020 22:17
K8S : Deploy code server online IDE
kind: Secret
apiVersion: v1
metadata:
name: code-server-secret
namespace: ${NAMESPACE}
stringData:
password: ${PASSWORD}
type: Opaque
@mikamboo
mikamboo / README.md
Last active June 18, 2020 13:38
Play with Symfony CRUD on Docker

Créer un projet Symfony 4 CRUD et REST api

Objectifs

Créer une app Symfony faisant du CRUD avec un dashboard admin et exposant une api RES. On va donc :

  • Créer un projet Symfony 4
  • Ajouter Sonata Admin bundle
  • Créer 2 entités : Company + User (1 relation many to 1 vers company)
  • Faire un CRUD User
@mikamboo
mikamboo / README.md
Last active August 2, 2019 12:53
Play with GraphQL

Play with GraphQL !

Nous allons apprendre à créer en à peine quelques minutes, à créer un petite application GraphQL dans un environnement nodejs.

Prérequis

Step 1 : Création de notre projet