Skip to content

Instantly share code, notes, and snippets.

View MarlonPassos-git's full-sized avatar
🌴
On vacation

Marlon Passos MarlonPassos-git

🌴
On vacation
View GitHub Profile
@MarlonPassos-git
MarlonPassos-git / useEventListener.ts
Created March 13, 2025 21:12
react hook useUserIteration.ts
/* eslint-disable @typescript-eslint/ban-ts-comment */
import type { RefObject } from "react";
import { useEffect, useRef } from "react";
import { useIsomorphicLayoutEffect } from "./useIsomorphicLayoutEffect";
type NewEvent = "storageUpdate" | "local-storage";
// MediaQueryList Event based useEventListener interface
function useEventListener<K extends keyof MediaQueryListEventMap>(
This file has been truncated, but you can view the full file.
{
"captchaResult": "CAPTCHA_NOT_NEEDED",
"kind": "pagespeedonline#result",
"id": "https://www.w3schools.com/html/html_examples.asp",
"loadingExperience": {
"id": "https://www.w3schools.com/html/html_examples.asp",
"metrics": {
"CUMULATIVE_LAYOUT_SHIFT_SCORE": {
"percentile": 0,
"distributions": [
alert("teste norlan")
@MarlonPassos-git
MarlonPassos-git / terminal.sh
Last active November 10, 2024 21:34
Config VSCode finditfaster dependecies
#!/bin/bash
mkdir temp1
cd temp1
# Instalar fzf
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install --all
# Instalar ripgrep
wget https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep-13.0.0-x86_64-unknown-linux-musl.tar.gz

Here's the Lodash parity data I've compiled so far.

The status "100" means it's an exact match with the Lodash implementation.

Implemented

| name | notes | status | rename | | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --

@MarlonPassos-git
MarlonPassos-git / keybinding.json
Last active November 10, 2024 20:23
VSCode config
// Coloque as suas associações de teclas neste arquivo para substituir os padrõesauto[]
[
{
"key": "alt+e",
"command": "HookyQR.beautifyFile"
},
{
"key": "ctrl+1",
"command": "workbench.action.openEditorAtIndex1"
},
import type { FC, ReactElement } from 'react'
import { useEffect, useState } from 'react'
interface DomContentInterface {
children: ReactElement<any, any> | null
}
const DOMContentLoadedWrapper: FC<DomContentInterface> = ({ children }) => {
const [isReady, setIsReady] = useState(false)
@MarlonPassos-git
MarlonPassos-git / tsconfig.json
Created May 2, 2023 20:13
tsconfig to: nodejs, typescript, ESM, import json files
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"lib": ["ES2022"],
"moduleResolution": "node",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"allowJs": true,
"outDir": "dist"
@MarlonPassos-git
MarlonPassos-git / instalar_cypress_wsl2.md
Created March 28, 2023 13:55 — forked from J-Pster/instalar_cypress_wsl2.md
Como instalar o Cypress no WSL2 (+ Puppeteer)

Instalando o Cypress no WSL 2 (+ Usando o Puppeteer em testes)

Depois de muito tempo sofrendo, finalmente descobri como instalar o Cypress de forma limpa e tranquila no WSL2, e vou te ensinar, e além disso, quando você instalar aqui o Cypress, testes que usam o Puppeteer que é a mesma dependência que o Cypress usa, também passarão a rodar no seu WSL2!

Esse tutorial é muito útil se você está tendo o erro error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory ou algo parecido!

Créditos ao autor original, nesse link!

Antes de executar qualquer comando, ou código que eu tenha deixado aqui, tenta primeiro entender o que está escrito, e para os .sh, dê uma lida neles, mesmo que eu diga que seja seguro, é sempre bom olhar!

@MarlonPassos-git
MarlonPassos-git / index.js
Last active March 9, 2023 14:40
blocks translation of code blocks on the web
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match *://*/*
// @grant none
// ==/UserScript==