Skip to content

Instantly share code, notes, and snippets.

View AlexGalhardo's full-sized avatar
😀
Remember: Always Have Fun

Alex Galhardo AlexGalhardo

😀
Remember: Always Have Fun
View GitHub Profile
@AlexGalhardo
AlexGalhardo / cpf.js
Created October 9, 2023 13:35 — forked from fiuzagr/cpf.js
Gerador/Validador de CPF funcional
const digitMod = (value, len) => {
const mod = len - Math.round(value - Math.floor(value / len) * len);
return mod >= 10 ? 0 : mod;
};
const mapValuesWithDigitModByKey = (_key, _len) => (value, key) =>
_key === key ? digitMod(value, _len) : value;
const reduceDigitsByKey = _key => (digits, value, key) => {
if (key > _key) {
@AlexGalhardo
AlexGalhardo / remove-node-modules.md
Created December 26, 2022 23:13 — forked from lmcneel/remove-node-modules.md
How to remove node_modules after they have been added to a repo

How to remove node_modules

Create a .gitignore file

  1. Check for an existing .gitignore file in the project directory
ls -a
@AlexGalhardo
AlexGalhardo / 1-criar-cluster-kind.sh
Created July 22, 2022 17:11 — forked from khaosdoctor/1-criar-cluster-kind.sh
Scripts e comandos que eu faço no vídeo sobre KinD com Kubernetes: https://www.youtube.com/watch?v=dL19dSGKZoc
kind create cluster --name demo-cluster
kind get clusters
kubectl config get-contexts
@AlexGalhardo
AlexGalhardo / four_elements_simple_design.md
Created May 11, 2022 13:04 — forked from O-I/four_elements_simple_design.md
The Four Elements of Simple Design

The Four Elements of Simple Design

  • Introduced by [Kent Beck][beck] in the 1990s.
  • Part of his software development methodology [Extreme Programming][extreme-programming].
  • His exact wording appears in the [White Book][white-book].

The rules can be stated as followed:

  1. Passes all tests
  2. Maximizes clarity
@AlexGalhardo
AlexGalhardo / settings.json
Created May 2, 2022 17:18 — forked from diego3g/settings.json
VSCode Settings (Updated)
{
"emmet.syntaxProfiles" : {
"javascript" : "jsx"
},
"workbench.startupEditor" : "newUntitledFile",
"editor.fontSize" : 16,
"javascript.suggest.autoImports" : true,
"javascript.updateImportsOnFileMove.enabled" : "always",
"editor.rulers" : [
80,
<h1 >Herick Exterkoetter</h1>
<p >Self-taught Developer. Enthusiast of web and mobile development technologies.</p>
<p>Passionate about education and teaching about programming.</p>
<h1>Connect with me:</h1>
[![Linkedin Badge](https://img.shields.io/badge/-Herick%20Exterkoetter-6633cc?style=flat-square&logo=Linkedin&logoColor=white&link=https://www.linkedin.com/in/herick-exterkoetter-197496195/)](https://www.linkedin.com/in/herick-exterkoetter-197496195/)
[![Gmail Badge](https://img.shields.io/badge/-herickherick47@gmail.com-6633cc?style=flat-square&logo=Gmail&logoColor=white&link=mailto:herickherick47@gmail.com)](mailto:herickherick47@gmail.com)
---
@AlexGalhardo
AlexGalhardo / db.json
Created November 9, 2021 18:15 — forked from luizomf/db.json
Random data generator using faker
{
"users": [
{
"id": "602",
"firstName": "Elisa",
"lastName": "Pereira",
"userName": "elisa.pereira",
"indexRef": 17,
"createdAt": "2017-02-15T11:29:40.799Z"
},
@AlexGalhardo
AlexGalhardo / EslintNodeJS.md
Created August 28, 2021 14:26 — forked from LucasMallmann/EslintNodeJS.md
Eslint and Prettier configuration for NodeJS and Express projects

Eslint and prettier config for nodejs and express projects

Eslint and Libs

You need to install eslint and some other config libs.

yarn add eslint prettier eslint-config-prettier eslint-plugin-prettier -D

yarn eslint --init

.eslintrc.js

@AlexGalhardo
AlexGalhardo / countrydropdown.html
Created August 15, 2021 00:17 — forked from danrovito/countrydropdown.html
HTML Country Select Dropdown List
<label for="country">Country</label><span style="color: red !important; display: inline; float: none;">*</span>
<select id="country" name="country" class="form-control">
<option value="Afghanistan">Afghanistan</option>
<option value="Åland Islands">Åland Islands</option>
<option value="Albania">Albania</option>
<option value="Algeria">Algeria</option>
<option value="American Samoa">American Samoa</option>
<option value="Andorra">Andorra</option>
<option value="Angola">Angola</option>
@AlexGalhardo
AlexGalhardo / flash-app.js
Created August 13, 2021 23:04 — forked from brianmacarthur/flash-app.js
Flash messaging in Express 4: express-flash vs. custom middleware in ejs, handlebars, or jade
var express = require('express');
var cookieParser = require('cookie-parser');
var session = require('express-session');
var flash = require('express-flash');
var handlebars = require('express-handlebars')
var app = express();
var sessionStore = new session.MemoryStore;
// View Engines