Skip to content

Instantly share code, notes, and snippets.

View surfaceflinger's full-sized avatar
🍃
WOLNEKONOPIE

surfaceflinger

🍃
WOLNEKONOPIE
View GitHub Profile
@rebane2001
rebane2001 / plot_discord_predictions.py
Last active June 21, 2024 19:30
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 May 8, 2024 06:32
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 March 1, 2024 05:50
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 30, 2023 19:55
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
@SamsungGalaxyPlayer
SamsungGalaxyPlayer / monero_acceptance_request.md
Last active September 28, 2021 18:20
For cold emailing merchants that support Bitcoin and that you believe should support Monero

Hello <>,

I notice that you accept Bitcoin as payment for your services. Increasingly, merchants whose customers care about privacy accept payments and donations in Monero (XMR). Monero offers strong privacy protections by default.

There are many ways to accept Monero, including direct acceptance, BTCPayServer, GloBee, and NOWPayments (which also can convert to an EUR bank account for settlement).

Thank you for your time, and please do not hesitate to ask if you have questions. Adding support for Monero isn't just you adding any other coin; it's the world's most used private digital payment option.

Thanks,

@anthony-y
anthony-y / switcher.py
Created September 9, 2021 00:05
Script I wrote to change my system theme automatically throughout the day.
#!/bin/python
import datetime as dt
import time
import os
SUNSET = 20 # switch to dark mode at 8PM
SUNRISE = 6 # day starts at 6AM
DAY_WP = "/home/ant/Pictures/wallpapers/day"
NIGHT_WP = "/home/ant/Pictures/wallpapers/night"