Skip to content

Instantly share code, notes, and snippets.

View charbonnierg's full-sized avatar

Guillaume Charbonnier charbonnierg

  • Araymond
  • Grenoble
  • 20:12 (UTC +02:00)
View GitHub Profile
@charbonnierg
charbonnierg / pip_grpcio_install
Created May 24, 2021 20:30
Output of pip install command with grpcio as package dependency on arm64
Looking in indexes: https://pkgs.dev.azure.com/QUARA/_packaging/quara-project/pypi/simple/
Collecting quara-gateway==1.0.0rc8
Downloading https://pkgs.dev.azure.com/QUARA/_packaging/0632d8c7-4eed-40c6-b03c-8ca7d5175748/pypi/download/quara-gateway/1rc8/quara_gateway-1.0.0rc8-py3-none-any.whl (8.4 kB)
Collecting quara-control-unit<2.0.0,>=1.0.0-rc.8
Downloading https://pkgs.dev.azure.com/QUARA/_packaging/0632d8c7-4eed-40c6-b03c-8ca7d5175748/pypi/download/quara-control-unit/1rc8/quara_control_unit-1.0.0rc8-py3-none-any.whl (15 kB)
Collecting quara-services<2.0.0,>=1.0.0-rc.8
Downloading https://pkgs.dev.azure.com/QUARA/_packaging/0632d8c7-4eed-40c6-b03c-8ca7d5175748/pypi/download/quara-services/1rc8/quara_services-1.0.0rc8-py3-none-any.whl (5.4 kB)
Collecting quara-cli<2.0.0,>=1.0.0-rc.8
Downloading https://pkgs.dev.azure.com/QUARA/_packaging/0632d8c7-4eed-40c6-b03c-8ca7d5175748/pypi/download/quara-cli/1rc8/quara_cli-1.0.0rc8-py3-none-any.whl (3.3 kB)
Collecting quara-core<2.0.0,>=1.0.0-rc.8
# This is the nebula example configuration file. You must edit, at a minimum, the static_host_map, lighthouse, and firewall sections
# Some options in this file are HUPable, including the pki section. (A HUP will reload credentials from disk without affecting existing tunnels)
# PKI defines the location of credentials for this node. Each of these can also be inlined by using the yaml ": |" syntax.
pki:
# The CAs that are accepted by this node. Must contain one or more certificates created by 'nebula-cert ca'
ca: /etc/nebula/ca.crt
cert: /etc/nebula/node.crt
key: /etc/nebula/node.key
#blocklist is a list of certificate fingerprints that we will refuse to talk to
@charbonnierg
charbonnierg / Install-natscli.md
Last active March 29, 2022 20:34
Install natscli from bash

How to install

Note: The script requires root permissions as it installs nats executable into /usr/local/bin

curl -sSL https://gist.githubusercontent.com/charbonnierg/b68d85e908c90160a1118838f2cceb63/raw/install-natscli.sh | bash
  • Install specific version:
@charbonnierg
charbonnierg / systemd_service_hardening.md
Created November 25, 2021 21:25 — forked from ageis/systemd_service_hardening.md
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
@charbonnierg
charbonnierg / pydantic_parser.py
Last active May 11, 2023 09:55
Pydantic models parser
"""
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
@charbonnierg
charbonnierg / empty.py
Last active April 23, 2023 18:52
An Empty class to use with Pydantic
"""
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and

Build Python

Build & install the python version of your choice quicky on Ubuntu 20.04:

curl -sL https://gist.githubusercontent.com/charbonnierg/fc805149c83f239f70dab055d409e868/raw/build-python.sh | sudo bash -s 3.10.13

Notes

"""
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
@charbonnierg
charbonnierg / variant-tree.py
Last active April 7, 2022 11:47
Text variants generation
"""
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
@charbonnierg
charbonnierg / downloader.py
Last active April 25, 2022 09:19
Az Custom Vision file downloader
from __future__ import annotations
import json
import urllib.request as request
from concurrent.futures import ThreadPoolExecutor
from pathlib import Path
from typing import Any, Dict, Iterator, List, Optional, Set, Union
from azure.cognitiveservices.vision.customvision.training import (
CustomVisionTrainingClient,