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
| /* eslint-disable no-console */ | |
| import { getHttpEndpoint } from '@orbs-network/ton-access' | |
| import { keyPairFromSeed } from '@ton/crypto' | |
| import { Address, beginCell, external, internal, storeMessage, toNano, TonClient, WalletContractV4 } from '@ton/ton' | |
| import { mnemonicToSeed as mnemonicToSeedBip39 } from 'bip39' | |
| import { deriveED25519Path } from './ed25519.ts' // https://github.com/tonkeeper/tonkeeper-web/blob/0b47a3d6523065d53d2d32c4a82a644bad797fb0/packages/core/src/service/ed25519.ts | |
| // for whatever reason ledger uses a non-standard bip39 path lol. | |
| // and since there aren't any gui wallets (i know of) that support custom derivation paths, i had to resort to this |
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 * as fsp from 'fs/promises' | |
| const BASE_PATH = '/mnt/s3-desu-priv-encrypted/music' | |
| const BASE_PATH_UNDERLYING = '/mnt/s3-desu-priv' | |
| async function* walk(path: string) { | |
| const entries = await fsp.readdir(path, { withFileTypes: true }) | |
| for (const entry of entries) { | |
| const fullPath = path + '/' + entry.name | |
| if (entry.isDirectory()) { |
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 * as fs from "node:fs"; | |
| import * as crypto from "node:crypto"; | |
| import * as path from "node:path"; | |
| import { DatabaseSync } from 'node:sqlite' | |
| const BLOBSTORE = '/srv/bluesky-pds/blobstore'; | |
| const DATA_DIR = '/srv/bluesky-pds/data'; | |
| const DID = 'did:web:tei.su' | |
| const didHash = crypto.createHash('sha256').update(DID).digest('hex').slice(0, 2); |
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
| // ==UserScript== | |
| // @name no svelte | |
| // @description all my homies hate svelte | |
| // @namespace teidesu | |
| // @match *://*/* | |
| // @grant window.close | |
| // @grant GM_addElement | |
| // @grant GM_getValue | |
| // @grant GM_setValue | |
| // @grant GM.getValue |
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
| // ==UserScript== | |
| // @name Open TikTok App | |
| // @version 1.0.0 | |
| // @author teidesu | |
| // @match *://*.tiktok.com/* | |
| // ==/UserScript== | |
| let m = window.location.pathname.match(/^\/@[^\/]+\/video\/(\d+)/) | |
| if (m !== null) { | |
| window.location.href = `snssdk1233://aweme/detail/${m[1]}`; | |
| } |
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
| dummy file for gist title |
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 HEX_ALPHABET = '0123456789абвгде' | |
| const B76_ALPHABET = | |
| 'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя0123456789' | |
| function toНёх(buf) { | |
| let ret = '' | |
| for (let i = 0; i < buf.length; i++) { | |
| const byte = buf[i] |
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 _got = require('got') | |
| const cheerio = require('cheerio') | |
| // cookie хедер с mos.ru | |
| const COOKIE = '' | |
| // код регистрации | |
| const REG_CODE = '1234-5678-9012' | |
| // номер документа без серии | |
| const DOC_NUM = '123456' |
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 prefix = 'prefix_' | |
| const rawLS = window.localStorage | |
| const wrappedLS = new Proxy(rawLS, { | |
| get(target, prop, receiver) { | |
| if (typeof target[prop] === 'function') { | |
| return function(key, value) { | |
| return target[prop](prefix + key, value) | |
| } | |
| } |
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
| /** | |
| * Emoji sprite and data generator. | |
| * | |
| * Data is taken from frankerfacez.com and name->char index is generated. | |
| * | |
| * Sprite generator works by parsing some of the code in DrKLO/Telegram (Telegram for Android) | |
| * and downloading emoji files contained there, while generating code and sprite. | |
| * | |
| * Can easily be modified to generate JSON instead of CSS or to download from some other source. | |
| * Can also be easily ported to TypeScript |
NewerOlder