This file contains 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 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 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 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 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 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 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 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 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 |
This file contains 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
package desu.player.views; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.view.View; | |
import android.view.animation.AccelerateDecelerateInterpolator; | |
import android.view.animation.Interpolator; |
NewerOlder