Skip to content

Instantly share code, notes, and snippets.

View nelsonfncosta's full-sized avatar
:shipit:
burnit

Nélson Costa nelsonfncosta

:shipit:
burnit
View GitHub Profile
@nelsonfncosta
nelsonfncosta / numDuplicates.js
Created October 26, 2020 10:11
numDuplicates example
function logItem() {
console.log(Array.from(arguments).join("\t"))
}
function numDuplicates(name, price, weight) {
const uniqueItems = new Set()
name.forEach(
(item, index) => {
const itemPrice = price[index]
@nelsonfncosta
nelsonfncosta / prepare-commit-msg
Created February 8, 2019 16:00
Commit prepare message
#!/bin/sh
#
# Automatically adds issue number (optional) and ticket number based on branch name or
# description to every commit message.
#
# Copy this file to .git/hooks under your local repository directory
# PS: If you're on linux you may need to change "sed -En" to "sed -rn"
#
# Example:
#
@nelsonfncosta
nelsonfncosta / example.js
Created October 22, 2018 09:43
JS private variable
function Container(param) {
let secret = 3;
let that = this;
this.member = param;
function dec() {
if (secret > 0) {
secret -= 1;
return true;
} else {
@nelsonfncosta
nelsonfncosta / example.js
Created October 22, 2018 09:41
JS private variable
function Container(param) {
let secret = 3;
let that = this;
this.member = param;
function dec() {
if (secret > 0) {
secret -= 1;
return true;
} else {

Keybase proof

I hereby claim:

  • I am nelsonfncosta on github.
  • I am nelson_costa (https://keybase.io/nelson_costa) on keybase.
  • I have a public key ASCr9rX-RNCh2Pw_V_vXunwBuOFpm-mdxcBqihAB0eznwQo

To claim this, I am signing this object: