Skip to content

Instantly share code, notes, and snippets.

View NitriKx's full-sized avatar

Benoît Sauvère NitriKx

View GitHub Profile
@NitriKx
NitriKx / vault-audit-logs-bigquery-schema.json
Created November 7, 2024 13:41
BigQuery schema for the Vault JSON audit logs
[
{
"name": "auth",
"type": "RECORD",
"mode": "NULLABLE",
"fields": [
{
"name": "accessor",
"type": "STRING",
"mode": "NULLABLE"
@NitriKx
NitriKx / google-ca-cert.pem
Created January 26, 2024 14:27
Google Root CA
GTS Root R1
===========
-----BEGIN CERTIFICATE-----
MIIFVzCCAz+gAwIBAgINAgPlk28xsBNJiGuiFzANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQGEwJV
UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg
UjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE
ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIiMA0G
CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx9vaM
f/vo27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7wCl7raKb0
xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjwTcLCeoiKu7rPWRnWr4+w
@NitriKx
NitriKx / delete-wiz-k8s-connector-in-error.py
Last active July 18, 2023 13:31
Delete all the Wiz Kubernetes connector in Error
import logging
import requests
from builtins import print, str, len, int, range, enumerate
from python_graphql_client import GraphqlClient
from requests import HTTPError
from typing import List, Optional, Dict
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger("wiz-client")
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Croit training VM'
Parameters:
EnvironmentName:
Description: A name that will be used in the resource creation
Type: String
AllowedPattern: "[a-zA-Z0-9]+"
InstanceType:
Description: EC2 instance type
@NitriKx
NitriKx / Coinhive-Dockerfile
Created October 9, 2017 15:47
Usage : docker --rm coinhive xxxxxxxxxx --username xxxxxx
FROM debian:jessie
RUN apt-get update && apt-get install -y curl libgtk-3-0 libgconf-2-4 libpangocairo-1.0-0 chromium
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
RUN apt-get install -y nodejs && apt-get -y clean
RUN mkdir -p /opt/coin-hive && cd /opt/coin-hive && npm install coin-hive
@NitriKx
NitriKx / GoogleAppEngineOkHTTP3RetrofitCallFactory.java
Created August 31, 2017 15:17
OkHttp3 Call Factory for Google AppEngine (useful for using swagger with Retrofit2 template)
package com.teevity.api.lowlevel.impl.googleappengine;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import com.google.common.base.Strings;
import com.teevity.api.lowlevel.impl.ApiException;
@NitriKx
NitriKx / SimpleHTTPServerWithUpload.py
Last active July 28, 2017 10:44 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload (support directories creation + only 127.0.0.1 + return 500 if error + CORS + Preflight requests + JSON/Gzip encoding support + DELETE)
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
__version__ = "0.1"
__all__ = ["SimpleHTTPRequestHandler"]
var ids=[203742316,
292566812,
301889439,
554951139,
433199066,
598142724,
452958246,
880599639,
2021663434,
@NitriKx
NitriKx / instruction-remote-cloudmip.md
Last active May 12, 2016 17:18
Instructions pour utilisé l'API OpenStack de Cloudmip depuis l'extérieur de l'Université

OSX/Linux seulement (ça doit pouvoir se faire avec Putty sur Wind0ws mais je l'ai pas sous la main)

Editez votre fichier host pour rajouter la ligne suivante (ne pas oublier de faire sudo). Si votre fichier host contient déjà frontal commentez cette ligne.

frontal    127.0.0.1

Lancer la commande suivante dans le terminal en replaçant "ens24" par votre identifiant (et entrer le mot de passe)

@NitriKx
NitriKx / gist:6fc97b7111aeecf0d7ec
Created January 21, 2016 15:35
[M2DL/TER] Coordonnées des zones/points de recyclage sur le site de Paul Sabatier
Verre
new LatLng(43.55891,1.47303);
new LatLng(43.55999,1.47194);
new LatLng(43.55995,1.47195);
new LatLng(43.56439,1.47053);
new LatLng(43.56355,1.47579);
new LatLng(43.55509,1.46816);
new LatLng(43.56295,1.46311);
new LatLng(43.56305,1.45939);