Skip to content

Instantly share code, notes, and snippets.

@LarchLiu
LarchLiu / random.ts
Last active March 5, 2022 10:37
XorShift by kotofurumiya
// XorShift by kotofurumiya
// https://sbfl.net/blog/2017/06/01/javascript-reproducible-random/
export class Random {
x: number;
y: number;
z: number;
w: number;
constructor(seed = 88675123) {
this.x = 123456789;
@LarchLiu
LarchLiu / tmd
Last active July 6, 2023 13:23
tmd user list
LarchLiu, [email protected], yansong
Tisoga, [email protected], tisoga
vite_js, [email protected],
antfu7, [email protected],
patak_dev, [email protected],
sanxiaozhizi, [email protected],
// https://github.com/BANKA2017/twitter-monitor/blob/node/apps/open_account/scripts/login.mjs
import crypto from 'node:crypto'
import { v5 as uuidv5 } from 'uuid'
import { $fetch } from 'ofetch'
const bearerToken = 'Bearer AAAAAAAAAAAAAAAAAAAAAFXzAwAAAAAAMHCxpeSDG1gLNLghVe8d74hl6k4%3DRUMF4xAQLsbeBhTSRrCiQpJtxoGWeyHrDb5te2jpGskWDFW82F'
const baseUrl = 'https://api.twitter.com'
const guestActivateUrl = `${baseUrl}/1.1/guest/activate.json`
const NAMESPACE = 'd41d092b-b007-48f7-9129-e9538d2d8fe9'
const username = ''