Skip to content

Instantly share code, notes, and snippets.

View JayTailor45's full-sized avatar
🎯
Focusing

JAY TAILOR JayTailor45

🎯
Focusing
View GitHub Profile
@JayTailor45
JayTailor45 / worker.js
Created April 21, 2020 05:30 — forked from tobiaslins/worker.js
Notion Custom Domain using Cloudflare Workers + Splitbee Analytics
const MY_DOMAIN = "help.splitbee.io"
const START_PAGE = "https://www.notion.so/splitbee/Help-Center-bbf26e2b70574901b9c98e5d11e449de"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, HEAD, POST,PUT, OPTIONS",
@JayTailor45
JayTailor45 / Setting up MCP without a full MCP release.md
Created September 13, 2020 14:59 — forked from Pokechu22/Setting up MCP without a full MCP release.md
Setting up MCP for newer versions (e.g. 1.12.2)

It's possible to use create an MCP installation for versions of Minecraft where there hasn't been a full MCP release. It takes a little bit of manual setup, but the end result is highly useful.

  1. Download and extract the most recent MCP build from http://www.modcoderpack.com/. (Currently, the latest build is http://www.modcoderpack.com/files/mcp940.zip)

  2. Edit version.cfg in the conf folder, and change ClientVersion and ServerVersion to the version you want (for instance, 1.12.2).

  3. Download the SRG zip for the version you want; these can generally be found at http://mcpbot.bspk.rs/mcp/<version>/mcp-<version>-srg.zip (for example, http://mcpbot.bspk.rs/mcp/1.11.2/mcp-1.11.2-srg.zip) or at http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/<version>/mcp-<version>-srg.zip (for example, http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/1.12.2/mcp-1.12.2-srg.zip). (For 1.12.1 and 1.12.2, only the minecraftforge link works)

  4. Extract that zip into the MCP conf folder, over

@JayTailor45
JayTailor45 / interpreter.js
Last active March 26, 2021 05:24
Assembly instructions interpreter challenge
/*
We want to create a simple interpreter of assembler which will support the following instructions:
`mov x y` - copies y (either a constant value or the content of a register) into register x
`inc x` - increases the content of the register x by one
`dec x` - decreases the content of the register x by one
@JayTailor45
JayTailor45 / main.md
Created January 24, 2023 17:12 — forked from hediet/main.md
Proof that TypeScript's Type System is Turing Complete
type StringBool = "true"|"false";


interface AnyNumber { prev?: any, isZero: StringBool };
interface PositiveNumber { prev: any, isZero: "false" };

type IsZero<TNumber extends AnyNumber> = TNumber["isZero"];
type Next<TNumber extends AnyNumber> = { prev: TNumber, isZero: "false" };
type Prev<TNumber extends PositiveNumber> = TNumber["prev"];