Skip to content

Instantly share code, notes, and snippets.

View angeloanan's full-sized avatar
🤖
programmed to work, not to feel~

Angelo angeloanan

🤖
programmed to work, not to feel~
View GitHub Profile
@NotNite
NotNite / json.ts
Last active June 20, 2024 01:20
JSON literal verification in TypeScript type system
/*
JSON literal verification in TypeScript type system (version 3.1 for workgroups)
now powerd by tail recursion (you can blame @ackwell for telling me to and
@s5bug for doing it)
*/
type HEX_CHARS =
| "0"
| "1"
| "2"
@Saren-Arterius
Saren-Arterius / Waydroid.sh
Last active May 2, 2024 07:44
Install Waydroid on Steam Deck (As of 2024-03-16)
#!/bin/sh
cage -- bash -c 'wlr-randr --output X11-1 --custom-mode 1280x800; sleep 1; sudo /usr/local/bin/waydroid-helper & waydroid show-full-ui'
@khvn26
khvn26 / steamos-vscode-docker-guide.md
Last active July 1, 2024 23:21
SteamOS VSCode + Docker guide

SteamOS VSCode + Docker guide

  1. Install Docker:

    sudo pacman -S docker
  2. Enable Docker systemctl unit:

Custom NBT Tree Tutorial

Overview

As of 1.19.2-2.0.1.0 BYG, BYG now depends on Corgilib. This library offers a new world gen feature for creating custom trees from NBT files.

Features include but not are limited to:

  • Allows to build trees with trunk & canopy structure NBT parts.
  • Allows the use of vanilla & modded tree decorators. These include but are not limited to:
  • Vines

TJA is a file format created for Taiko simulators to have playable charts. It contains the metadata and the notation for all of the song's difficulty levels. "WAVE:" in the file points to an external audio file that should be in the same directory as the TJA.

This page covers TJA support in taiko-web, but may apply to other simulators as well.

Specification

TJA file is a plain text file that can be encoded as either UTF-8 with BOM or as Shift-JIS. The extension is ".tja". The container format for the audio file does not matter as long as it is supported in the simulator. If the TJA file is hosted on taiko-web, the filename should be "main.tja" for the TJA file and "main.ogg" for the audio file.

Comments can be inserted at any point by starting them with //, comment will continue until the end of that line.

@Benricheson101
Benricheson101 / discordOAuth2ScopeToggle.user.js
Last active November 7, 2023 13:54
Toggle Discord OAuth2 scopes on the authorization page or the in-app auth screen
// ==UserScript==
// @name Toggle Discord OAuth Scopes
// @version 0.2
// @description Toggle Discord OAuth scopes by clicking them on the auth screen
// @author Ben Richeson (github.com/benricheson101)
// @match https://discord.com/oauth2/authorize?*
// @match https://*.discord.com/oauth2/authorize?*
// @match https://discord.com/channels/*
// @match https://*.discord.com/channels/*
// ==/UserScript==
@legowerewolf
legowerewolf / readme.md
Last active April 7, 2024 02:13
Tailscale on Steam Deck
@Benricheson101
Benricheson101 / discord-bottom.js
Last active September 5, 2023 16:19
i need help
{
const mods = webpackChunkdiscord_app.push([
[Date.now()],
{},
e => Object.values(e.c),
]);
const provider = mods.find(
m => m?.exports?.Z?.getLanguages && Object.keys(m.exports.Z.Messages).length
).exports.Z._provider;
const strs = mods.find(m => m?.exports?.COMMAND_NICK_SUCCESS);
@Benricheson101
Benricheson101 / main.go
Last active February 26, 2022 09:32
Get statistics about your Discord bot. The go file supports large bot sharding
// Copyright (c) 2022 Benjamin Richeson
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
@HeathLoganCampbell
HeathLoganCampbell / !Extra info.md
Last active March 13, 2024 08:05
A weekend project to allow minecraft worlds to be saved in a mysql database, mysql worlds. This was done on top of Paper 1.17 on fa53a1a7f

SkyPaper

Uploading and download Minecraft worlds from mysql

The idea was to be able to upload worlds to a database so that we could have multiple servers upload and download them at will to enable load balancing for servers such as skyblock as the demands of scalable 1.17 servers grow while the performance falls version to version.

The important idea here was to see if it was possible to upload worlds to a database, which the answer is yes :D. but this even works better for skyblock servers as they are mostly air, which allowed us to do a small optimization. which is when a chunk is empty, we don't have it, as generating empty chunks is cheap as chips, but storing them has about 500B of overhead. so it ends up taking longer to fetch them from the database, then just generate them.