Skip to content

Instantly share code, notes, and snippets.

View nathan818fr's full-sized avatar
👑

Nathan Poirier nathan818fr

👑
View GitHub Profile
@nathan818fr
nathan818fr / x570_aorus_master.conf
Last active January 31, 2024 20:40
lm-sensors config for X570 AORUS MASTER
# /etc/sensors.d/x570_aorus_master.conf
# Gigabyte X570 AORUS MASTER
#
# dmi: Board Manufacturer: Gigabyte Technology Co., Ltd.
# dmi: Board Product Name: X570 AORUS MASTER
#
# Require https://github.com/frankcrawford/it87
chip "acpitz-acpi-0"
# temp1 and temp2 are hardcoded and always returns 16.8°C
@nathan818fr
nathan818fr / build_looking-glass-client.md
Last active October 14, 2023 05:42
Command to build Looking Glass client (tested with B6) for Debian bookworm, inside a container (podman / docker).
  1. Download and extract Looking Glass sources from: https://looking-glass.io/downloads
  2. Navigate to the extracted folder
  3. Run the following command:
mkdir -p "${PWD}/out" &&
podman run --rm -v "${PWD}:/src/:ro" -v "${PWD}/out/:/src/out/:rw" -it "debian:$(lsb_release -sc)" /bin/bash -c '
set -e
export DEBIAN_FRONTEND=noninteractive
@nathan818fr
nathan818fr / haproxy.cfg
Last active April 17, 2024 13:39
Decoding the Minecraft handshake with HAProxy (protocol version, hostname, next-state) to choose which backend to use.
global
lua-load /path/to/haproxy_minecraft.lua
[...]
defaults
[...]
frontend mc_listener
bind *:25565
mode tcp
  1. On crée la commande, les identifiants wsLogin et wsPassword sont forcément spécifiés sinon la commande ne pourrait pas être créee.

> POST https://test-ws.hipay.com//soap/payment-v2/generate:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://test-ws.hipay.com/soap/payment-v2">
  <SOAP-ENV:Body>
    <ns1:generate>
      <parameters>
@nathan818fr
nathan818fr / ANDORRA_TELECOM_IPS.MD
Last active August 16, 2018 10:52
List ANDORRA TELECOM IP blocks.

L'organisation RIPE d'Andorra Telecom possède l'ID ORG-SdTd1-RIPE. On peut le vérifier avec la commande:

$ whois -h whois.ripe.net -- '-T organisation ORG-SdTd1-RIPE' | grep '^org-name:'
org-name:       ANDORRA TELECOM SAU

On récupère son ASN:

@nathan818fr
nathan818fr / my_aff_comb.c
Last active August 29, 2015 14:24
A WTF epitech my_aff_comb.c - only 8 lines of code in 2 functions (for lucas <3)
int my_aff_combr(int i)
{
if (i % 4 == 3)
my_putchar(',');
my_putchar((i % 4 == 3) ? ' ' : '0' + ((i / 4) / (i % 4 == 0 ? 100 :
(i % 4 == 1) ? 10 : 1) + i % 4) % 10);
if (i < 3111)
my_aff_combr(i + (i % 400 == 311 ? 44 * (3 + i / 400) + 1 :
(i % 40 == 31 ? (4 * (3 + i / 40) + 1) - (i / 400) * 40 : 1)));
}