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 | |
class Decoder { | |
pos = 0 | |
constructor (str) { | |
this.str = str | |
} | |
decode () { |
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 { Context } from 'koa' | |
function isPojo (obj: any): boolean { | |
return obj && typeof obj === 'object' && obj.constructor === Object | |
} | |
export interface SseController { | |
emit (options?: SseEmitOptions): void | |
close (): void |
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
#!/usr/bin/env node | |
/* | |
Simple script to download galleries from exhentai.org w/out GPs, H@H or torrents | |
Requires node >= 10 to run (uses fs.promises) | |
Dependencies: | |
yarn add cheerio node-fetch mime-types | |
# or | |
npm install cheerio node-fetch mime-types |
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
export class LinkedList { | |
constructor () { | |
this._first = null | |
this._last = null | |
this.length = 0 | |
} | |
push (item) { | |
let value = { | |
prev: null, |
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
/* | |
Small script for exporting passwords from Firefox Lockwise to Chrome CSV | |
Usage: | |
1. Open passwords page (about:logins) | |
2. Open devtools (F12) | |
3. Paste the following script | |
4. Wait a few seconds, a download prompt will appear. | |
Tested with 70.0.1 (64-bit) (Linux x64) | |
(c) teidesu 2019. This script is licensed under GPLv3 |
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
#!/bin/bash | |
API_KEY="..." | |
ZONE_ID="..." | |
RECORD_ID="..." | |
ADDRESS="..." | |
curl -X PUT "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records/$RECORD_ID" \ | |
-H "Authorization: Bearer $API_KEY" \ | |
-H "Content-Type: application/json" --data "{\"type\": \"A\", \"name\": \"$ADDRESS\", \"content\": \"$(curl ipv4.icanhazip.com)\", \"proxied\": false}" |
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
#!/bin/bash | |
# To generate public key: | |
# openssl req -x509 -nodes -days 1000000 -newkey rsa:4096 -keyout backup_key.pem\ | |
# -subj "/C=US/ST=Illinois/L=Chicago/O=IT/CN=www.example.com" \ | |
# -out backup_key.pem.pub | |
# | |
# To decrypt: | |
# openssl smime -decrypt -in some.bin -binary -inform DEM -inkey your.pem | bzcat > some.pg |
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 is small script that (ab)uses Yandex Music Recognition. | |
I hope the code is self-documented <3 | |
Notice! Input file should be .ogg file, preferably with libopus encoder | |
(untested with other encoders) | |
(c) teidesu, 2019. This script is licensed under GPLv3 license. | |
""" | |
import lomond | |
import uuid as uuid_py |
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
/* | |
* VK token refresh script for audio. | |
* The only dependency is axios. | |
* Can be simply embedded in your app: | |
* const { refreshToken } = require('./vk-audio') | |
* ... | |
* refreshToken(oldToken) | |
* | |
* Note that you will need to use Kate Mobile's token and user agent, for example: | |
* KateMobileAndroid/52.1 lite-445 (Android 4.4.2; SDK 19; x86; unknown Android SDK built for x86; en) |
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
/* | |
* Script for checking whether the Telegram username is occupied. | |
* Uses t.me (or its mirrors, configurable as a second parameter), so there are no | |
* flood limits. | |
* Usage: | |
* const checkUsername = require('./tg-username-checker') | |
* // ... | |
* await checkUsername('someone') | |
* await checkUsername('someone', 'telesco.pe') | |
* Alternatively, can be used as an interactive CLI when ran directly. |