Skip to content

Instantly share code, notes, and snippets.

TheBrokenRail / index.ts
Last active January 22, 2023 03:41
View index.ts
import { ChatGPTAPIBrowser, ChatResponse, SendMessageOptions } from 'chatgpt';
import { Client, GatewayIntentBits, Events, PermissionsBitField, WebhookCreateMessageOptions, MessageType, MessageFlags, TextChannel, ThreadChannel, WebhookEditMessageOptions, ForumChannel, Webhook } from 'discord.js';
import { RateLimiter } from 'limiter';
// Login To ChatGPT
const api = new ChatGPTAPIBrowser({
email: '<Your Email>',
password: '<Your Password>',
isGoogleLogin: true
TheBrokenRail /
Last active March 25, 2023 10:05
Jailbreak Firefox!


This script allows you to install unsigned extensions (ones that aren't approved by Mozilla) on normal Firefox builds and the official Snap! That's right, no "Firefox Developer Edition" nonsense required!

⚠️ Disclaimer ⚠️

This script is not well tested, like at all. This script might break things, possibly important things. You should probably take a backup of your Firefox profile before using it. You have been warned.


sudo apt install -y curl unzip zip
# Only needed when jailbreaking the Snap
TheBrokenRail / Dockerfile
Last active January 31, 2021 04:52
Mesa-QEMU Bug
View Dockerfile
FROM arm32v7/debian:bullseye
RUN apt-get update && apt-get install -y mesa-utils
package com.thebrokenrail.minecraftbakery.texture.builtin.atlas;
import com.thebrokenrail.minecraftbakery.texture.Texture;
public class TerrainAtlas extends Texture {
public TerrainAtlas() {
super("terrain", 256, 256);
private void block(String name, int x, int y) {
TheBrokenRail /
Created November 11, 2020 16:22
Simple Program Allowing MCPI level.dat Files To Be Used With NBT Editors


This is a simple command-line program that will remove or add the additional header information MCPI/Old MCPE uses in its level.dat files, this header information prevents many commonly used NBT ediors/libraries from reading MCPI/Old MCPE level.dat files.

Header Details

The header consists of 2 32-bit little-endian integers. The first integer is the "storage version", this is always equal to 3. The second integer is the remaining bytes in the file, this is used to detect file corruption.


pi-nbt add-header in.dat out.dat
pi-nbt remove-header in.dat out.dat
View vibrate.c
#include <linux/input.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
#include <time.h>
#include <errno.h>
#define LENGTH 250
int msleep(long msec) {
TheBrokenRail /
Last active June 19, 2020 20:36

Place both shell scripts in the root of your dev environmen and change the package name in

import java.nio.ByteBuffer;
import org.java_websocket.client.WebSocketClient;
import org.java_websocket.drafts.Draft;
import org.java_websocket.drafts.Draft_6455;
import org.java_websocket.handshake.ServerHandshake;
public class Client extends WebSocketClient {
TheBrokenRail /
Created March 5, 2019 22:03
Build TinyCC
set -e
if [[ -d tinycc ]]; then
rm -rf tinycc