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 December 19, 2024 02:14
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:[email protected]: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

@YuMS
YuMS / update-git.sh
Created June 29, 2016 09:28
Update git to latest version on Ubuntu
#!/bin/bash
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git -y
@diego3g
diego3g / NODE.md
Last active April 29, 2025 16:13
VSCode Settings (Updated)

⚠️ Note!

With VSCode version 1.94, the APC extension broke and there is no fix yet.

So, for those having issues with APC after the VSCode update, I recommend downloading the previous version of VSCode for now (https://code.visualstudio.com/updates/v1_93) and setting updates to manual by adding this to the editor's configuration:

"update.mode": "manual",
@yovany-lg
yovany-lg / expo-typescript-eslint-prettier.md
Last active September 14, 2024 19:52
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: