Skip to content

Instantly share code, notes, and snippets.

View doceazedo's full-sized avatar

DoceAzedo doceazedo

View GitHub Profile
# https://stackoverflow.com/a/74430442
# https://stackoverflow.com/a/37570435
mkdir out
for f in *.AVI; do
dur=$(ffprobe -v error -show_entries format=duration -of compact=p=0:nk=1 "$f")
ffmpeg -i "$f" -t $dur -af "volume=0.25" "out/${f%.*}.mp4"
done
@doceazedo
doceazedo / how-much-i-spent-on-fortnite.js
Last active April 13, 2024 20:57
quanto gastei no fortnite
// https://www.epicgames.com/account/transactions
let timeout;
let tries = 0;
let showMore = () => {
if (tries >= 15) return sum();
timeout = setTimeout(showMore, 300);
tries = tries + 1;
@doceazedo
doceazedo / workaround.js
Created December 12, 2023 18:53
Video embed fullscreen scroll position issue
// Sources:
// https://stackoverflow.com/questions/64304444/is-there-any-way-to-detect-fullscreen-events-in-youtube-iframe-api
// https://stackoverflow.com/questions/45597346/how-do-i-prevent-custom-full-screen-from-resetting-the-scroll-position
let top2 = 0;
const handleFullscreen = () => {
if (document.fullscreenElement) {
top2 = document.querySelector('html').scrollTop;
console.log(`Setting to ${top2}`);
} else {
@doceazedo
doceazedo / willotree.ts
Created September 6, 2023 17:48
willotree
import { get, writable } from 'svelte/store';
type Profile = {
name: string;
pictureUrl: string;
id: string;
};
type GameState = {
state: 'IDLE' | 'PLAYING' | 'END';
<html lang="en"><head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Portfolio - Lucas Figueiredo</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/jgthms/minireset.css@master/minireset.min.css">
<link rel="icon" href="img/avatar.png" type="/x-icon">
<script src="https://kit.fontawesome.com/131d03fe17.js" crossorigin="anonymous"></script><style media="all" id="fa-v4-font-face">/*!
* Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
@doceazedo
doceazedo / 0_settings.json
Last active May 17, 2023 01:19
✨ DoceAzedo's VS Code Settings ✨
{
"editor.fontFamily": "Fira Code, monospace, 'Segoe UI Emoji'",
"editor.fontLigatures": true,
"editor.minimap.enabled": false,
"editor.tabSize": 2,
"explorer.confirmDragAndDrop": false,
"explorer.confirmDelete": false,
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
"editor.wordWrap": "on",
"discord.detailsEditing": "📝 Editando: {filename}",
https://id.twitch.tv/oauth2/authorize?response_type=token&client_id=XXXXX&redirect_uri=https://lucasfernandes.com.br&scope=bits:read+chat:read+chat:edit+channel:moderate+whispers:read+whispers:edit+channel:read:redemptions+channel:manage:redemptions+channel:read:editors+user:read:subscriptions+user:read:follows+user:manage:chat_color+moderator:read:followers+channel:read:subscriptions
@doceazedo
doceazedo / tiktok-voices.ts
Created March 23, 2023 02:39
TikTok TTS Voices
export const tikTokVoices = [
'en_us_001',
'en_us_006',
'en_us_007',
'en_us_009',
'en_us_010',
'en_uk_001',
'en_uk_003',
'en_au_001',
'en_au_002',
@doceazedo
doceazedo / 0-README.md
Last active November 22, 2022 14:59
[Datawrapper Weekly Chart] Visualizing my year on music with a calendar heatmap

Visualizing my year on music with a calendar heatmap

Hi! Just a quick disclaimer. This script was made to fit my needs and with the only purpose of generating my chart data, that means it is quite hardcoded and you may need to do some adjustments if you're planning to use it. For example, you might want to take a look at the albumCovers and badwords variables.

If you just want the 2022 calendar date positions to build your own calendar heatmap, take a look at the calendar.csv file.

You'll need a Last.fm API key and a Spotify access token.

After running the script, look for the file out/dataset.csv on the same directory of the script.

@doceazedo
doceazedo / run.bat
Last active July 9, 2022 20:59
[Recursos da talk] Aprenda a programar em Kotlin fazendo plugins para Minecraft
java -Xms2G -Xmx4G -jar paper-1.19-58.jar --nogui
PAUSE