Skip to content

Instantly share code, notes, and snippets.

View birdayz's full-sized avatar
🔥
nerden

Johannes Brüderl birdayz

🔥
nerden
View GitHub Profile
@cthornton
cthornton / BazelJunit5FilterParser.java
Last active July 21, 2021 20:40
Better Parsing of Bazel Test Filter for JUnit5
static List<String> parseOptions(String testBridgeTestOnly) {
// transform env.TESTBRIDGE_TEST_ONLY
List<String> methodNames = new ArrayList<>();
List<String> classNames = new ArrayList<>();
List<String> packageNames = new ArrayList<>();
ArrayList<String> tests = new ArrayList<>();
// Tests are separated by | But so are methods so we can't blindly split on the | character.
@Elijas
Elijas / g915-on-linux.md
Last active February 10, 2024 06:32
How to fix Logitech G915 going back to rainbow after sleep on Linux

How to fix the reset to rainbow lightning effect after keyboard wakes up from sleep

Install G HUB (Windows or MacOS), connect keyboard with Lightspeed, go to Settings, and set ON-BOARD MEMORY MODE to ON. This is a one-time setup for the lifetime of a keyboard.

Other features that work on Linux

Works out of the box:

  • All the media buttons, game mode (disables the Win key), volume control. In other words, all the buttons work.
  • Pressing cycles through brightness levels.
  • Pressing + [NUM] (where [NUM] is 0, 1, 2, ..., 9) allows you to change the lightning effect on the fly.
  • Pressing + - and + + changes the lightning effect speed for the non-custom effects.
@adleong
adleong / lost-sock.sh
Last active January 31, 2023 21:03
Detect half-open connections in Kubernetes
#!/bin/bash
pods=$(kubectl get po -A -l linkerd.io/control-plane-ns -ojsonpath="{range .items[*]}{.metadata.name} {.metadata.namespace}{'\n'}{end}")
IFS=" "
while read name namespace; do
tcp=$(kubectl debug -n $namespace $name --image=cr.l5d.io/linkerd/debug:stable-2.12.0 -it -- cat /proc/net/tcp)
close_wait=$(echo $tcp | awk 'BEGIN {cnt=0} $4==08 {cnt++} END {print cnt}')
fin_wait_2=$(echo $tcp | awk 'BEGIN {cnt=0} $4==05 {cnt++} END {print cnt}')
@zuphilip
zuphilip / README.md
Last active September 8, 2021 00:29
Tesseract IPython Notebook

Binder

@skinnay-dev
skinnay-dev / hunter-bis-alli.md
Last active October 30, 2023 23:47
Skinnay's Classic Hunter Gear lists (Alliance)

Skinnay's Classic Hunter Gear Lists (Alliance)

  • "True" BiS is the absolute best gear configuration given all the possible options. Often this doesn't give you a great picture of what you should be striving for, so realistic alternative sets are provided to plan for constraints that can occur with typical loot distribution.
  • Stat weights and dps values are based on Sixx's DPS sheet assuming full buffs, consumables, and boss debuffs with 20/31/0 spec, unless otherwise specified. These are of course subject to change with different variables.
  • Gear lists are based on their general effectiveness against all raid bosses as opposed to being tailored for specific bosses, unless otherwise specified.

Table of Contents

@samyranavela
samyranavela / Example health-check script with systemd socket activation
Created April 18, 2018 12:56 — forked from kouk/Example health-check script with systemd socket activation
Simple HTTP health-check by abusing systemd socket activation with shell scripts
$ curl --dump-header - localhost:12345
HTTP/1.0 404 Not Found
Content-Type: text/html
Content-Length: 43
Date: Fri, 05 Dec 2014 17:48:56 +0000
<html>
<body>
<h1>WUT</h1>
</html>
@ego008
ego008 / multiple-host-reverse-proxy.go
Last active April 10, 2023 17:41
Multiple host reverse proxy in Go
package main
import (
"log"
"net/http"
"net/http/httputil"
"net/url"
)
var (
#!/bin/bash -e
# Usage ./k8s-service-account-kubeconfig.sh ( namespace ) ( service account name )
TEMPDIR=$( mktemp -d )
trap "{ rm -rf $TEMPDIR ; exit 255; }" EXIT
SA_SECRET=$( kubectl get sa -n $1 $2 -o jsonpath='{.secrets[0].name}' )
@peterhellberg
peterhellberg / evdev-bobblehat.go
Created September 18, 2016 11:58
How to use the Raspberry Pi Sense HAT Joystick using golang-evdev
package main
import (
"flag"
"fmt"
"os"
"os/signal"
evdev "github.com/gvalkov/golang-evdev"
screen "github.com/nathany/bobblehat/sense/screen"
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active July 15, 2024 09:31
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096