Skip to content

Instantly share code, notes, and snippets.

@3deep5me
3deep5me / main.tf
Created February 11, 2025 10:18
Hetzner Object Storage with AWS Terraform Provider
resource "aws_s3_bucket" "main" {
bucket = "my-bucket-a9c8ae4e2"
object_lock_enabled = true
}
resource "aws_s3_bucket_acl" "main" {
bucket = aws_s3_bucket.main.id
acl = "private"
}
@mateusz834
mateusz834 / register-as-security-key.md
Last active March 9, 2025 16:06
register a security key on google, not as a passkey.

Paste this to console:

const originalCreate = window.navigator.credentials.create;
window.navigator.credentials.create = async function (options) {
    if (options && options.publicKey && options.publicKey.authenticatorSelection) {
        options.publicKey.authenticatorSelection.residentKey = 'discouraged';
    }
    return originalCreate.call(window.navigator.credentials, options);
};
@rebane2001
rebane2001 / plot_discord_predictions.py
Last active March 8, 2025 05:47
Simple script to plot your Discord machine-learning predicted age and gender from the data dump.
"""
Simple script to plot your Discord machine-learning predicted age and gender from the data dump.
To use, simply put this script in your activity/analytics/ folder of your Discord data dump and run it.
You may need to install matplotlib first:
pip install -U matplotlib
thrown together by rebane2001
@kennytv
kennytv / readme.md
Last active December 11, 2025 21:12
Signed Chat and Chat Types

Signed chat

This gist intends on clearing up some of the misinformation surrounding signed chat/the reporting feature Mojang has added to Minecraft 1.19.1. Here you can find both technical information as well as a general explanation of how these work.

Profile keys

After joining a server, clients now send a profile key used for verifying a message's authenticity. This key and thus the whole signing process is optional, but by default, servers enforce secure profiles for clients to send chat messages. Whenever the player sends a chat message and has a key associated, the message will be signed using their own private key, which the server then verifies using the public key sent after join. Assuming signature, timestamp, and message contents line up, the message goes through.

On the other end, clients can also require all broadcasted player messages to be signed, disregarding the ones without sender verified signatures.

Message signatures

@L3n1n
L3n1n / SteamSummerSaleCheatEventBadge2022.user.js
Last active June 28, 2022 07:08
Steam Summer Sale Cheat Event Badge 2022
// ==UserScript==
// @name Steam Summer Sale Cheat Event Badge 2022
// @namespace https://gist.github.com/L3n1n
// @version 0.61
// @description Automatic finding
// @author L3n1n
// @match *://store.steampowered.com/sale/clorthax_quest*
// @updateURL https://gist.githubusercontent.com/L3n1n/3248f42b6e4fd4500c26f0311443300d/raw/SteamSummerSaleCheatEventBadge2022.user.js
// @downloadURL https://gist.githubusercontent.com/L3n1n/3248f42b6e4fd4500c26f0311443300d/raw/SteamSummerSaleCheatEventBadge2022.user.js
// ==/UserScript==
// ==UserScript==
// @name Tidal declutterer
// @namespace http://tampermonkey.net/
// @version 0.7
// @description Gives the Tidal web app some nice visual tweaks and hides non-personalized recommendations (ads). User configurable.
// @author solarkraft@mailbox.org
// @match https://listen.tidal.com/*
// ==/UserScript==
// The app is made with react and it would be preferable to directly hook into that to
@gmemstr
gmemstr / Pipfile
Last active November 21, 2025 09:58
Speedtest against Hetzner servers
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
requests = "*"
[dev-packages]
@m1cr0man
m1cr0man / flake.nix
Last active October 5, 2024 13:18
The simplest Nix Flake for nixos-rebuild
# This can be built with nixos-rebuild --flake .#myhost build
{
description = "the simplest flake for nixos-rebuild";
inputs = {
nixpkgs = {
# Using the nixos-unstable branch specifically, which is the
# closest you can get to following the equivalent channel with flakes.
url = "github:NixOS/nixpkgs/nixos-unstable";
};
@Xavier59
Xavier59 / privatekeysolana.js
Created December 28, 2021 14:49
Convert Solana private key from/to base58/uint8array
// exporting from a bs58 private key to an Uint8Array
// == from phantom private key to solana cli id.json key file
// npm install bs58 @solana/web3.js
const web3 = require("@solana/web3.js");
const bs58 = require('bs58');
let secretKey = bs58.decode("[base58 private key here]");
console.log(`[${web3.Keypair.fromSecretKey(secretKey).secretKey}]`);
// exporting back from Uint8Array to bs58 private key