Skip to content

Instantly share code, notes, and snippets.

function centerString(string, distance) {
const spaces = ' '.repeat(distance)
return spaces + string + spaces
}
function calculateTriangle(n, a = [[1]]) {
if (n < 2) {
return a
}

Discord API Raid History

  • Total Bans: 3413
  • Total Raids: 33
  • Average Bans Per Raid: 103.42 bans
  • Average Time Between Raids: 8.88 days

All dates are based on CST.

export default class Polygon {
x = 0;
y = 0;
constructor(public width: number, public height: number) {
}
draw(context: CanvasRenderingContext2D, x: number, y: number) {
}
@apacheli
apacheli / hello_payload.json
Last active January 29, 2022 03:31
Decode using ETF
[
131,
116,
0,
0,
0,
4,
100,
0,
1,
import aiohttp
import asyncio
import os
class RequestClient:
def __init__(self, token: str):
self.token = token
self.url = "https://api.revolt.chat/"
from datetime import datetime
MS_TO_DAYS = 8.64e+7
DISCORD_EPOCH = 1420070400000
FIRST_RAID = 1606866300000
total_bans = int(input("total bans: "))
total_raids = int(input("total raids: "))
first_case = int(input("first case: "))
first_case_url = input("first case url: ")
@apacheli
apacheli / generate.py
Created March 15, 2022 01:29
mdbook_emoji.py
import aiohttp
import asyncio
import os
async def main():
async with aiohttp.ClientSession() as session:
headers = {
"accept": "application/vnd.github.v3+json"
}
async with session.request("GET", "https://api.github.com/emojis", headers=headers) as response:
@apacheli
apacheli / git instructions
Created April 26, 2022 03:53
because apparently i'm too dumb and i forget
echo "# gerdjt" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M master
git remote add origin https://github.com/apacheli/gerdjt.git
git push -u origin master
const APPDATA = Deno.env.get("APPDATA");
const VERSION = 2;
while (true) {
const input = prompt("Search for a mod:");
if (input === null) {
continue;
}
console.log("Searching...");
const APPDATA = Deno.env.get("APPDATA");
const index = await Deno.readTextFile(
`${APPDATA}/.minecraft/assets/indexes/1.19.json`,
);
const json = JSON.parse(index);
const directories = {};
const promises1 = [];