Theorically bulletproof CSS class for visually hide anything and keep it accessible to ATs.
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
/* | |
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 => { |
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
/* | |
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 |
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
/** | |
* 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. |
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
/** | |
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 |
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
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 |
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 | |
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> |
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
/* | |
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. |
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
{ | |
"scripts": { | |
"build": "npm run build:es2015 && npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:umd:min", | |
"build:es2015": "tsc --module es2015 --target es2015 --outDir dist/es2015", | |
"build:esm": "tsc --module es2015 --target es5 --outDir dist/esm", | |
"build:cjs": "tsc --module commonjs --target es5 --outDir dist/cjs", | |
"build:umd": "rollup dist/esm/index.js --format umd --name YourLibrary --sourceMap --output dist/umd/yourlibrary.js", | |
"build:umd:min": "cd dist/umd && uglifyjs --compress --mangle --source-map --screw-ie8 --comments --o yourlibrary.min.js -- yourlibrary.js && gzip yourlibrary.min.js -c > yourlibrary.min.js.gz", | |
} | |
} |
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
# use this command to add 5-seconds delay to the audio track of a video | |
# | |
ffmpeg -i input.mp4 -itsoffset 5 -i input.mp4 -map 0:v -map 1:a -vcodec copy -acodec copy delayed.mp4 |
NewerOlder