Skip to content

Instantly share code, notes, and snippets.

View felippe-regazio's full-sized avatar
Coding

Felippe Regazio felippe-regazio

Coding
View GitHub Profile
@felippe-regazio
felippe-regazio / unfollow-non-followers-twitter.js
Created December 20, 2021 04:39 — forked from gui25/unfollow-non-followers-twitter.js
Code to stop following those ones who are not following you back on Twitter and keeping those you want or follow anyone you want, with certain filters (working in July 2019)
/*
Unfollow (stop following) those people who are not following you back on Twitter (or unfollow everyone if desired).
This will work for new Twitter web site code structure (it was changed from July 2019, causing other unfollow-scripts to stop working).
Instructions:
1) The code may need to be modified depending on the language of your Twitter web site:
* For English language web site, no modification needed.
* For Spanish language web site, remember to set the 'LANGUAGE' variable to "ES".
* For another language, remember to set the 'LANGUAGE' variable to that language and modify the 'WORDS' object to add the words in that language.
@felippe-regazio
felippe-regazio / exec-pipe.js
Created January 24, 2022 18:58
Execute a pipe of commands on linux or windows using Node
#!/usr/bin/env node
const exec = require('child_process').exec;
/**
* Cross-platform command execution script with promise pipe.
* If any part of pipe fail, the entire pipe will also fail.
*
* @param command string
* @returns Promise<String>
function typed(t, ...args) {
args.forEach(value => {
const typeMatch = t === 'array' ? Array.isArray(value) : typeof value === t;
if (!typeMatch) {
/**
* Você pode fazer o que quiser aqui. Se quiser parar a runtime,
* vc pode lançar um erro (throw new Error()). No nosso caso apenas
* vamos avisar que tipos estão diferindo mas deixar o programa
* continuar. Usamos console.warn + new Error inves de console trace
@felippe-regazio
felippe-regazio / challenge-scoreboard-ie10.js
Last active October 21, 2022 05:06
Simple gist that shows an implementation of a challenge
/**
Desafio intermediário de JavaScript:
Imagine que estou apostando corrida de carrinhos Hot Wheels com meu filho, e preciso de uma função JS pra registrar o placar.
O problema é que eu só tenho o Internet Explorer de 2010 pra fazer essa função, então tenho algumas regras
- não posso utilizar let nem const
- não posso manipular o escopo externo
- não posso utilizar nenhum mock
@felippe-regazio
felippe-regazio / tt-seek-and-destroy.js
Last active August 20, 2024 13:13
Automatically unfollow Twitter users by a given criteria
/**
* ABOUT
*
* This is a Twitter NO-API/Dependency-Free follower sniffer and auto-blocker.
*
* This function performs automatic bulk blocking with NO-API
* and NO-external-dependencies to run. You must run this snippet
* directly on your Console, it will sniff your followers list
* search for previous given keywords, if found on username or description,
* the user will be automatically blocked.

Improved .sr-only

Theorically bulletproof CSS class for visually hide anything and keep it accessible to ATs.

A Pen by ffoodd on CodePen.

License.

@felippe-regazio
felippe-regazio / dummy-cli.js
Created May 25, 2023 00:55
Just a dummy node CLI
/*
Simple and dummy CLI in node. Usage
node cli.js <command> <-flags> <--options[=value]> <arguments>
Example:
node cli.js
node cli.js help
node cli.js hello
@felippe-regazio
felippe-regazio / piano.js
Last active October 6, 2023 05:59
Turns your keyboard into a Piano
/*
Put this code on a page or paste on your console, then focus on the page
and try to press keys from q...p and a...l
*/
const getKeyFrequency = n => Math.pow(2, (n - 49) / 12) * 440;
const audioCtx = new AudioContext();
const playing = {};
window.addEventListener('keydown', e => {