Skip to content

Instantly share code, notes, and snippets.

View EduardoPazz's full-sized avatar
🏠
Working from home

Edu Paz EduardoPazz

🏠
Working from home
View GitHub Profile
@EduardoPazz
EduardoPazz / script.js
Last active August 24, 2021 22:42
Toggle node class based on URL script
function highlight() {
const currentURL = window.location.href;
if (!currentURL.includes("categorias")) {
return;
}
// Indexes
const K = 0; // Stands for Key
@EduardoPazz
EduardoPazz / react-setState-example.js
Last active August 2, 2021 23:09
React's setState example
/*
It creates a button that when it's pressed, it creates another button with the counter incremented. The new button causes
the same action. Any clicked button will create a new button with the same behavior of the previous.
*/
import React from 'react';
import ReactDOM from 'react-dom';
class Multiplier extends React.Component {
@EduardoPazz
EduardoPazz / tarcheatsheet.md
Last active April 30, 2021 16:55 — forked from faesin/tarcheatsheet.md
Tar usage / Tar Cheat Sheet

Tar Usage / Cheat Sheet

Commands

Compress: tar -cv$f name-of-archive.tar.$$ /path/to/directory-or-file

Extract: tar -xv$f name-of-archive.tar.$$ /path/to/directory-or-file

  • c: Create an archive;
  • x: Extract from archive;
@EduardoPazz
EduardoPazz / select-estados_brasileiros.html
Last active February 25, 2020 19:52 — forked from quagliato/select_estados.html
<select> com todos os estados brasileiros, separados em regiões por <optgroup>s
<select id="" name="">
<optgroup label="Centro-Oeste">
<option value="DF">Distrito Federal</option>
<option value="GO">Goiás</option>
<option value="MT">Mato Grosso</option>
<option value="MS">Mato Grosso do Sul</option>
</optgroup>
<optgroup label="Sudeste">
<option value="ES">Espírito Santo</option>
<option value="MG">Minas Gerais</option>