Skip to content

Instantly share code, notes, and snippets.

@qgustavor
qgustavor / whatsapp-increase-volume.user.js
Created March 12, 2025 15:37
Increase WhatsApp Web Audio Volume
// ==UserScript==
// @name Increase WhatsApp Web Audio Volume
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Intercept audio creation and redirect to Web Audio API with increased volume using createMediaElementSource
// @author ChatGPT
// @match https://web.whatsapp.com/*
// @run-at document-start
// ==/UserScript==
// ==UserScript==
// @name Block DuckDuckGo's AI
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Add kbg=-1 and kbe=0 to DuckDuckGo URLs if missing
// @author qgustavor
// @match *://duckduckgo.com/*
// @grant none
// @installUrl https://gist.github.com/qgustavor/c2dba88fdec3d2383310b1503d766065/raw/no-duck-ai.user.js
// @updateUrl https://gist.github.com/qgustavor/c2dba88fdec3d2383310b1503d766065/raw/no-duck-ai.user.js
@qgustavor
qgustavor / ssp-captcha-breaker.user.js
Last active February 19, 2025 15:39
Quebra o "captcha" da Secretaria de Segurança Pública do Governo de Goiás (SSP-GO)
// ==UserScript==
// @name Quebra o "captcha" da Secretaria de Segurança Pública do Governo de Goiás (SSP-GO)
// @namespace Violentmonkey Scripts
// @match https://raivirtual.ssp.go.gov.br/*
// @grant none
// @version 1.0
// @author qgustavor
// @description Quebra o "captcha" da Secretaria de Segurança Pública do Governo de Goiás (SSP-GO)
// ==/UserScript==
@qgustavor
qgustavor / blue-prince.md
Last active January 16, 2025 13:35
Annotations for the Blue Prince game

Warning

THIS PAGE INCLUDES SPOILERS! This document is a work in progress, you can contribute by leaving a comment.

Annotations for the Blue Prince game

Introdution

I have noticed that the Blue Prince game (at the time of writting only a demo was released), despite being really interesting, is a game where is really hard to find info about it in the internet.

Surely you can find a lot about the game by playing the demo, but that requires you to have a computer that can handle the game (and mine is having some few issues at the moment). The easiest way to get info about this game I could find so far is checking playthoughts on YouTube, but you can't just Ctrl+F a video.

@qgustavor
qgustavor / check-cnpj-example.js
Last active July 25, 2024 13:18
Code to check a CNPJ number and automatically suggest fixes in case of a single digit typo
import { checkCNPJ } from './check-cnpj.js'
const userCNPJ = '01.005.727/0001-23'
const result = checkCNPJ(userCNPJ)
if (result.valid) {
console.log(`The CNPJ ${result.formattedCNPJ} is valid.`)
} else {
console.log(`The CNPJ ${result.formattedCNPJ} is invalid.`)
if (result.possibleCorrections.length > 0) {
@qgustavor
qgustavor / population-model.js
Created May 7, 2024 16:14
Population model to simulate what could happen if two female woman could have female children together and children had 95% chance of inheriting their parents' sexuality
// 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
}
@qgustavor
qgustavor / cifras.user.js
Last active March 23, 2024 03:50
Keep Cifras Awake
// ==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/[email protected]/dist/no-sleep.umd.cjs
@qgustavor
qgustavor / Reddit no longer exists.user.js
Last active June 11, 2023 17:25
An userscript to aid people addited on Reddit to forget that this website ever existed
// ==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
// ==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==
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])