Skip to content

Instantly share code, notes, and snippets.

View ElderSam's full-sized avatar
💚
coding ...

Elder Samuel ElderSam

💚
coding ...
View GitHub Profile
@Tagliatti
Tagliatti / validaPIS.Pasep.js
Last active April 25, 2023 18:14
Valida PIS/Pasep - JS
function validarPIS(pis) {
var multiplicadorBase = "3298765432";
var total = 0;
var resto = 0;
var multiplicando = 0;
var multiplicador = 0;
var digito = 99;
// Retira a mascara
var numeroPIS = pis.replace(/[^\d]+/g, '');
@theffc
theffc / git-proxy.md
Last active May 2, 2024 19:33
Como configurar o git para funcionar com um servidor proxy.

Ativar

Para fazer o git usar um servidor proxy, utilize o seguinte comando:

git config --global http.proxy http://YOUR_PROXY_USERNAME:YOUR_PROXY_PASSWORD@YOUR.PROXY.SERVER:8080

YOUR_PROXY_USERNAME => como é comum o uso de um email para o USERNAME, é necessário utilizar no lugar do @ do email, o seguinte código pwd%40123.

Desativar

@diego3g
diego3g / settings.json
Last active July 24, 2024 20:25
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 15,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [
80,
120
],
@yovany-lg
yovany-lg / expo-typescript-eslint-prettier.md
Last active July 19, 2024 09:03
Setting up React Navite: Expo + Typescript + Eslint (Airbnb) + Prettier

Steps to get started with Expo, Typescript, ESLint and Prettier

The first step is to use the Expo CLI to initialize the project. If you don't have the latest version of the Expo CLI tool, (or you don't have it installed) run npm install -g expo-cli.

Now run the following commands in the same order:

  • expo init my-app -t expo-template-blank-typescript
  • npx install-peerdeps --dev eslint-config-airbnb
  • npm i --save-dev @typescript-eslint/parser @typescript-eslint/eslint-plugin
  • npm i --save-dev prettier eslint-config-prettier eslint-plugin-prettier

Create or edit the file .eslintrc.json with the following content: