Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Alex Bruno Cáceres alexbruno

🏠
Working from home
Block or report user

Report or block alexbruno

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@alexbruno
alexbruno / simple-lodash-get-like.js
Last active Oct 8, 2019
Simple JS lodash.get like function
View simple-lodash-get-like.js
/**
* Simple JS lodash.get like function
*
* @export Function
* @param {*} object
* @param {String|Array} path
* @param {*} value
*/
export default function get (object, path, value) {
const pathArray = Array.isArray(path) ? path : path.split('.').filter(key => key)
@alexbruno
alexbruno / main.js
Last active Jul 26, 2018
Cowsay menu
View main.js
#!/usr/bin/env node
const inquirer = require('inquirer')
const cp = require('child_process')
const questions = [{
name: 'words',
default: 'Hello World!',
message: 'Digite uma frase:'
}, {
name: 'it',
type: 'list',
@alexbruno
alexbruno / LICENSE.txt
Last active Jun 26, 2018 — forked from LeverOne/LICENSE.txt
generate random v4 UUIDs (107 bytes)
View LICENSE.txt
DO WTF YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alexey Silin <pinkoblomingo@gmail.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WTF YOU WANT TO PUBLIC LICENSE
@alexbruno
alexbruno / multiple_ssh_setting.md
Created May 8, 2018 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts
View multiple_ssh_setting.md

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@alexbruno
alexbruno / index.js
Last active May 22, 2018
Boilerplate Test
View index.js
#!/usr/bin/env node
const inquirer = require('inquirer'),
cp = require('child_process'),
https = require('https'),
path = require('path'),
fs = require('fs'),
root = process.cwd(),
questions = [{
name: 'dir',
@alexbruno
alexbruno / valida.cnpj.js
Last active Jan 14, 2020
Validação de CNPJ
View valida.cnpj.js
function cnpj(s) {
let cnpj = s.replace(/[^\d]+/g, '')
// Valida a quantidade de caracteres
if (cnpj.length !== 14)
return false
// Elimina inválidos com todos os caracteres iguais
if (/^(\d)\1+$/.test(cnpj))
return false
You can’t perform that action at this time.