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
// Function to interpolate missing rates | |
function interpolateRate(rates, age) { | |
const surroundingRates = Object.entries(rates) | |
.filter(([key]) => Number(key) <= age) | |
.sort((a, b) => Number(a[0]) - Number(b[0])) // Sort by age (ascending) | |
if (surroundingRates.length === 0) { | |
// No rates available, return 0 (adjust as needed) | |
return 0 | |
} |
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 Keep Cifras Awake | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-03-21 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.cifraclub.com.br/* | |
// @icon https://icons.duckduckgo.com/ip2/cifraclub.com.br.ico | |
// @grant none | |
// @require https://unpkg.com/@zakj/no-sleep@0.13.5/dist/no-sleep.umd.cjs |
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
// REPL - Ler, compilar, mostrar, repetir | |
!function repl ( // colocar ! atrás da função: economiza um caractere, ao invés de usar () | |
input // para não ter que colocar "var " colocamos nos argumentos | |
) { | |
input = prompt('Insira um comando:'); // "prompt" lê a entrada | |
if (input) // se o usuário entrou com um comando, então: | |
alert(eval(input)), // alerta o resultado do comando, usando "eval" | |
setTimeout(repl) // chama a função novamente depois de 4ms | |
}() // executa a função, iniciando o loop |
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
// In case of "Exceeded maximum execution time" retry after some time | |
// Copied files and folders will not be copied again | |
// Changes: | |
// - Don't "search" for source and target folders | |
// - Inline some variables (to make it run faster) | |
// - Avoid Logger when possible (it can make script slower) | |
function start() { | |
var source = DriveApp.getFolderById('get-source-folder-id-in-link'); |
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 Reddit no longer exists | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description An userscript to aid people addited on Reddit to forget that this website ever existed | |
// @author qgustavor | |
// @match https://*.reddit.com/* | |
// @icon https://icons.duckduckgo.com/ip2/reddit.com.ico | |
// @grant none | |
// @run-at document-start |
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 Detect Reddit Copy Bot Comments | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Detect copied comments in Old Reddit. | |
// @author qgustavor | |
// @match https://*.reddit.com/* | |
// @icon https://icons.duckduckgo.com/ip2/reddit.com.ico | |
// @grant none | |
// ==/UserScript== |
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 dnssd from 'npm:ya-dns-sd' | |
const timeout = Number(Deno.args[0]) || 30 | |
// Check if it's needed and prompt | |
const connectedDevices = new TextDecoder().decode(await Deno.run({ | |
cmd: ['adb', 'devices'], | |
stdout: 'piped' | |
}).output()).split(/\r?\n/g).filter(e => e).slice(1).map(e => e.split('\t')[0]) |
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
// Download Deno here: https://deno.land/#installation | |
// Download this file | |
// Run it using: deno run -A adb-auto-connect.ts [ip address] | |
import PQueue from 'https://deno.land/x/p_queue@1.0.1/mod.ts' | |
import ProgressBar from 'https://deno.land/x/progress@v1.2.7/mod.ts' | |
const hostname = Deno.args[0] ?? '' // <-- set default ip address here to make the argument optional | |
// Check if it's needed and prompt |
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 { parseFlags } from 'https://deno.land/x/cliffy@v0.25.7/flags/mod.ts' | |
import parse from 'https://cdn.skypack.dev/pin/@qgustavor/ass-parser@v0.2.2-3MSleKF9Tb13M9TVjKIV/mode=imports/optimized/@qgustavor/ass-parser.js' | |
import stringify from 'https://cdn.skypack.dev/pin/@qgustavor/ass-stringify@v0.1.8-dniPlKxAanwMSbtHFyUD/mode=imports/optimized/@qgustavor/ass-stringify.js' | |
import JSON5 from 'https://deno.land/x/json5@v1.0.0/mod.ts' | |
const defaultConfig = { | |
targetDir: '..', | |
filenameReplacement: null, | |
handleLineBreaks: false, | |
shiftTimes: 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
/* ==UserStyle== | |
@name DuckDuckGo From Hologra Episode 139 | |
@namespace thesola10 | |
@version 1.0.0 | |
@license MIT | |
@updateURL https://gist.github.com/qgustavor/f46d933d45dac29b6894f8c60d0d1e9d/raw/duckduckgo.user.css | |
@author thesola10, qgustavor | |
==/UserStyle== */ | |
@-moz-document domain("duckduckgo.com") { |
NewerOlder