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; |
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
/** | |
* Similar to Promise.race(), but resolves once one of the promises | |
* resolve to a successful value and didn't throw error. | |
* A promise result is considered `successful` when | |
* check(result) resolves to a truthy value. | |
* | |
* When all promises resulted with unsuccessful values, `null` is returned, | |
* otherwise result of first successful one is returned | |
* |
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
// This file is licensed under LGPLv3 | |
// (c) teidesu 2020 | |
const qs = require('querystring') | |
const crypto = require('crypto') | |
// https://gist.github.com/teidesu/a1eadf71ffd88166415e2ea8b94d3f3b | |
const bencode = require('./bencode') | |
function convert (file) { | |
const data = bencode.decode(f) |
NewerOlder