This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hi() { | |
console.log("hi") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function actions_per_turn(speeds, turns) { | |
const arr = []; | |
const slowest_speed = Math.min(...speeds); | |
for (const speed of speeds) { | |
const speed_arr = []; | |
let remainder = 0; | |
for (let i = 0; i < turns; i++) { | |
const value = speed / slowest_speed + remainder; | |
const floored = Math.floor(value); | |
speed_arr.push(floored); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const damage = 100; | |
const hp = 15_000; | |
const damage_reduction = .25; | |
const damage_reduction_limit = hp * .3; | |
const damage_reduced = Math.min(damage * damage_reduction, damage_reduction_limit); | |
const incoming_damage = Math.max(1, damage - damage_reduced); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface Field { | |
contentType?: string; | |
filename?: string; | |
name: string; | |
value: string | Uint8Array; | |
} | |
export const boundary = Math.random().toString(16).substring(2); | |
export async function* fileIterator(fields: Field[]) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { randomBytes } from "node:crypto"; | |
import { request as httpRequest } from "node:http"; | |
import { request as httpsRequest } from "node:https"; | |
const DEFAULT_PORT = 443; | |
const SEC_WEBSOCKET_VERSION = 13; | |
class WebSocket extends EventTarget { | |
constructor(url, protocols) { | |
super(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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..."); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: ") |
NewerOlder