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
| 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 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
| /** | |
| * 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 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
| // 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) |
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
| // This file is licensed under LGPLv3 | |
| // (c) teidesu 2020 | |
| const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567' | |
| const padLength = [0, 1, 3, 4, 6] | |
| const padChar = '=' | |
| function encode (buf) { | |
| let arr = [...buf] | |
| let len = arr.length | |
| let ret = '' |
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
| // This file is licensed under LGPLv3 | |
| // (c) teidesu 2020 | |
| class Decoder { | |
| pos = 0 | |
| constructor (str) { | |
| this.str = str | |
| } | |
| decode () { |
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 { 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 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
| #!/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 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
| export class LinkedList { | |
| constructor () { | |
| this._first = null | |
| this._last = null | |
| this.length = 0 | |
| } | |
| push (item) { | |
| let value = { | |
| prev: null, |
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
| /* | |
| 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 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
| #!/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}" |