Skip to content

Instantly share code, notes, and snippets.

View sriio's full-sized avatar

Sylvain Rio sriio

  • France, Bretagne
View GitHub Profile
@lbenedetto
lbenedetto / build.gradle
Last active August 28, 2023 13:35
Stuff to add to your build.gradle in order to rewrite the bytecode of your dependencies to use jakarta
buildscript {
dependencies {
classpath group: "org.ow2.asm", name: "asm-commons", version: "9.4"
}
}
allprojects {
configurations.all {
resolutionStrategy {
dependencySubstitution {
@DeedleFake
DeedleFake / README.md
Last active October 24, 2024 14:43
`binary-trees` using `GOEXPERIMENT=arenas`.

binary-trees benchmark

This gist implements the binary-trees benchmark from the Language Shootout Game using the arenas GOEXPERIMENT in Go 1.20. trees.go is based on the Go #6 entry, but uses a manual free list instead of sync.Pool. To enable arena support, just set GOEXPERIMENT=arenas.

Results on my Machine

Stats

@CharlesGodwin
CharlesGodwin / cloudflare.md
Last active February 18, 2026 17:40
I Don't Need Port Forwarding and Don't Care About CGNAT

I Don't Need Port Forwarding and Don't Care About CGNAT

This was rewritten 2022-11-30

This article is for users that want all these features:

  • To connect to home network from anywhere
  • Can connect without any port forwarding; either by choice or internet provider can't or won't provide access
  • No setup or configuration or installation on client machine
  • No enrolment / registration required
@Hakky54
Hakky54 / cheat_sheet_http_client_ssl_configuration_for_java_kotlin_scala.md
Last active November 4, 2025 14:33
Cheat Sheet - Http Client SSL TLS Configuration for Java Kotlin and Scala with example http requests
@myyc
myyc / arch_linux_install_guide.md
Last active March 12, 2026 21:49
Arch Linux setup with all the good stuff (Plymouth, encryption, systemd-boot etc.)

I've used this guide through 2024 despite archinstall and it's still more or less valid. After having used archinstall twice and having encountered obscure issues (luksOpen taking ages, or slow reboots in general) I switched back to a manual setup and it seems to be almost as straightforward.

Always refer to the official guide in case of doubt.

First things first

One important thing first: the environment you will encounter on the live image is very different from what you'll end up installing, some things are significantly easier there: e.g. wifi tools come

@krisek
krisek / alert.rules.yml
Last active February 10, 2026 10:39
Prometheus alert rules for node exporter
groups:
- name: node_exporter_alerts
rules:
- alert: Node down
expr: up{job="monitoring-pi"} == 0
for: 2m
labels:
severity: warning
annotations:
title: Node {{ $labels.instance }} is down
@ruanbekker
ruanbekker / promtail_docker_logs.md
Last active September 27, 2025 23:41
Docker Container Logging using Promtail
@andrebreves
andrebreves / PercentageDistribution.java
Last active November 22, 2023 16:43
Calculates correctly distributed percentages (that sums to 100%) of arrays, collections and maps of numbers.
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import static java.util.stream.Collectors.toMap;
import static java.util.stream.Collectors.toUnmodifiableList;