Skip to content

Instantly share code, notes, and snippets.

View CarlosDanielDev's full-sized avatar
:octocat:
debugging

Carlos Daniel CarlosDanielDev

:octocat:
debugging
View GitHub Profile
@avrcoelho
avrcoelho / MaskJS.js
Last active August 28, 2020 16:19
Mask for string
const mask = (value, pattern) => {
let index = 0;
const string = value.toString();
return pattern.replace(/#/g, () => string[index++] || '');
}
mask('1145820412', '(##) ####-####')
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
export ANDROID_HOME=~/Android/Sdk
export PATH="$PATH:$ANDROID_HOME/tools"
export PATH="$PATH:$ANDROID_HOME/platform-tools"
# Path to your oh-my-zsh installation.
export ZSH="/Users/diegofernandes/.oh-my-zsh"
export PATH="$PATH:/usr/local/bin"
const normalize = str => {
return String(str)
.normalize('NFD')
.replace(/[\u0300-\u036f]/g, "")
}
// Main function
const findBySimilarity = (list = [], strings = '', keys = [], terms = normalize( strings ).toLowerCase().split(' ')) => {
@mojoaxel
mojoaxel / _README.md
Last active September 3, 2022 13:39
node.js script to install the latest version of zeit/hyper using the debian package

This skript downloads and installs the most recent version of Hyper using last DEP package for linux.

Setup

git clone https://gist.github.com/mojoaxel/4fa8947905472818a72a97c113b535ae update-hyper
cd update-hyper
npm install

Update Hyper