Skip to content

Instantly share code, notes, and snippets.

View Huskydog9988's full-sized avatar
👷‍♂️
Making useless projects

Husky Huskydog9988

👷‍♂️
Making useless projects
View GitHub Profile
@Aizistral
Aizistral / AbsoluteStateOfChatReporting.md
Last active February 14, 2024 05:32
The Absolute State of Chat Reporting

The Absolute State of Chat Reporting

Originally introduced in 1.19.1, chat reporting has undergone many changes in Mojang's attempts to eliminate the exploits and make the system functional. The purpose of this paper is to document the current technical state of chat reporting on an ongoing basis, and to provide a reference for the community to use when discussing the system. To that end I will try to keep it as unbiased as possible.

The Basics

Chat reporting heavily relies on cryptographic commitments and signatures to ensure that reported chat messages are not tampered with. The basic idea is that all players sign their chat messages with their private key, and then send the signature along with the message to the server.

Chat signing keypair is not generated by the client as one could expect; instead, it is issued by Mojang's services and is tied to the player's account. This means that the keypair is shared between all clients that the player uses, and the player can't change it. The keypair is f

@Purpzie
Purpzie / update-lockfile.yml
Last active May 6, 2023 13:22
Action to update pnpm-lock.yaml when Dependabot opens a PR. Be warned that this may cause lots of merge conflicts.
# https://github.com/dependabot/dependabot-core/issues/1736
name: Dependabot
on: pull_request_target
permissions: read-all
jobs:
update-lockfile:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
permissions:
pull-requests: write
@KATT
KATT / favourite-ts-tricks.md
Last active July 26, 2023 06:16
🧙‍♂️ Favourite non-obvious TS tricks

Record<string, x | undefined>

Represent maps

// rather than 
const map: {[ key: string ]: string} = {
  foo: 'bar',
}
@yohannawaliya
yohannawaliya / index.pug
Created April 15, 2020 14:23
Kindle Paperwhite Simulator
.container.d-flex.justify-content-center.py-5
.kindle
.screen
// Page Controls
.overlay.w-100.h-100.d-none
.controls.w-100.h-100.d-none
.top.d-flex.justify-content-center.align-items-center Tap here to see menu
.left.d-flex.justify-content-center.align-items-center Previous
.center.d-flex.justify-content-center.align-items-center Tap here to exit menu
.right.d-flex.justify-content-center.align-items-center Next
@benisameme
benisameme / mojimove.md
Last active July 8, 2022 07:06
The emoji movie script

the world we live in. it's so... wonderous. mysterious. even magical. no... no no no.. not that world. i meant this one. the smartphone. each system and program app is it's own little planet of perfect. technology. all providing services so necessary, so crucial, so unbelievably profound. look who just sent me a text! addie mccallister? it must be a mistake. or a joke. or a scam! don't send her your social security number. she's right there! that's our user, alex. and, like every freshman in high school, his whole life, everything, revolves around his phone. and, because the pace of life gets, faster and faster... phones down in five. and attention spans get shorter and shorter... and... you're probably not even listening to me right now. who has the time to type out actual words? and that's where we come in. the most important invention in the history of communication! emo gees. that's my home! textopolis. here, each of us does one thing, and we have to nail it every time. christmas tree just has to stand th

@msrose
msrose / combining-git-repositories.md
Last active June 26, 2024 14:30
How to combine two git repositories.

Combining two git repositories

Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:

  • preserve all commits of both repositories, but replace everything from A with the contents of B, and use rA as your remote location
  • actually combine the two repositories, as if they are two branches that you want to merge, using rA as the remote location

NB: Check out git subtree/git submodule and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.

Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.

@letanure
letanure / braille.js
Created April 12, 2014 20:38
text to braille
var brailleTable = {
'1': '⠼⠁',
'2': '⠼⠃',
'3': '⠼⠉',
'4': '⠼⠙',
'5': '⠼⠑',
'6': '⠼⠋',
'7': '⠼⠛',
'8': '⠼⠓',
'9': '⠼⠊',