Skip to content

Instantly share code, notes, and snippets.

View JoaoVictor6's full-sized avatar
:octocat:
Busy

João Victor JoaoVictor6

:octocat:
Busy
View GitHub Profile
@josethz00
josethz00 / sr-frontend-interview-questions-answered.md
Last active March 14, 2026 13:58
Sr. Frontend Interview Questions

Senior Frontend Interview Questions

Some questions about frontend development that might be in your next job interview. The questions were formulated by @mauvieira, a super senior fullstack developer

General Frontend

  • What are the strategies we can use to optimize the performance of web applications?

    • CDNs, GraphQL (maybe) to reduce overfetching, improve backend performance, use SSR and/or SSG, lazy loading for loading assets only when it's needed, minimize and compress HTML, CSS and JS files, and optimize images by compressing and resizing them.
  • What are Web Vitals (LCP, FID, CLS)? And how are they applied in the real world?

@Xavier577
Xavier577 / websocket_nodejs_implementation.md
Last active January 18, 2025 00:38
Implementing a websocket server without any libraries with raw nodejs

Code snippet

import { createServer } from "http";
import crypto from "crypto";

const PORT = 8001;

// this is from the web-socket specification and not something that is generated
const WEBSOCKET_MAGIC_STRING_KEY = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";

Como Pensar

Ler e entender um pouco desse artigo. https://wiki.c2.com/?FeynmanAlgorithm

  • Reconhecer como você pensa
  • Descrever métodos que você usa para pensar
  • Entender métodos diferentes de pensar
  • Fazer perguntas sobre tudo(incluindo sobre perguntas)

Perguntas

@imteekay
imteekay / distractionless-medium.js
Created August 20, 2022 17:49
Making the Medium reading experience distractionless.
// Remove left and right content
const main = document.getElementsByTagName('main')[0];
const body = document.getElementsByTagName('body')[0];
const newBody = document.createElement('body');
newBody.appendChild(main);
body.replaceWith(newBody);
// Remove "More From Author" in the footer
function getAllTagsWithText(tag, text) {
@sibelius
sibelius / woovi_challenge.md
Last active December 24, 2024 16:25
Woovi Challenge
@ErickWendel
ErickWendel / websocket-client.js
Last active March 3, 2025 17:04
Pure WebSocket Node.js Server using Native HTTP Module
// make a request
const options = {
port: 1337,
host: 'localhost',
headers: {
'Connection': 'Upgrade',
'Upgrade': 'websocket'
}
};
const protocol = 'http'
@sibelius
sibelius / testingConcept.md
Last active February 1, 2024 17:36
testing library concept and basic test

You first need to undestand the concept of frontend tests.

You should not test the implementation but the behavior

You test like the end user

For instance, imagine a login screen with email and password inputs and a submit button

The test should input the email and the password, then click in the submit button.

@rponte
rponte / using-uuid-as-pk.md
Last active January 19, 2026 17:56
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

@onlurking
onlurking / programming-as-theory-building.md
Last active March 18, 2026 21:19
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct