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
@mary-ext
mary-ext / solid-signals.ts
Last active August 8, 2024 08:10
Solid.js-like signals on top of the TC39 Signals proposal
import { Signal as WebSignal } from 'signal-polyfill';
export type Accessor<T> = () => T;
export type Setter<in out T> = {
<U extends T>(...args: undefined extends T ? [] : [value: (prev: T) => U]): undefined extends T
? undefined
: U;
<U extends T>(value: (prev: T) => U): U;
<U extends T>(value: Exclude<U, Function>): U;
<U extends T>(value: Exclude<U, Function> | ((prev: T) => U)): U;
@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 September 26, 2024 01:05
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 August 29, 2024 06:20
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