Skip to content

Instantly share code, notes, and snippets.

View mauvieira's full-sized avatar
🤙

Mauricio Vieira mauvieira

🤙
View GitHub Profile
@mauvieira
mauvieira / react-topics.md
Created October 26, 2024 13:35
react-topics

Elements as props

  • Elements as props
  • Conditional rendering and performance
  • Default values for the elements from props

Render props

  • Render props for rendering Elements
  • Children as render props
  • Hooks replaced render props

Memoization

  • The problem: comparing values
@mauvieira
mauvieira / ney.js
Created October 18, 2024 18:23
ney crawler
const puppeteer = require('puppeteer');
const fs = require('fs');
(async () => {
const browser = await puppeteer.launch({ headless: true });
const page = await browser.newPage();
const totalPages = 3;
const fileName = 'reviews.txt';

basics

  • learn the four operations REALLY well with:

    • integers
    • fractions
    • decimals
    • etc make it natural
  • other basic operations

  • power

@mauvieira
mauvieira / yt-bulk-unsubscribe.js
Created January 24, 2024 01:05
YouTube Bulk Unsubscribe
// go to https://www.youtube.com/feed/channels
// paste the code and hit enter
(async () => {
const UNSUBSCRIBE_DELAY_TIME = 2000;
const runAfterDelay = (fn, delay) =>
new Promise((resolve) => setTimeout(() => resolve(fn()), delay));

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@mauvieira
mauvieira / c-dsa-checklist.md
Last active April 27, 2023 21:55
c and dsa checklist

C lang

  • how to compile: GCC or Clang
  • variables, data types, arrays, structures, functions and pointers
  • operators: arithmetic, relational, logic, bitwise, etc
  • control flow structures
  • standard library

projects

  • file manager: crud with folders and files
  • text editor