Skip to content

Instantly share code, notes, and snippets.


Ismael Santos Kafeltz kafeltz

View GitHub Profile
kafeltz / Convert float to string
Last active Aug 29, 2015
Solução brutalmente simples pra formatar moeda brasileira (BRL) de float pra string. Sem framework ou lib. Altere conforme a necessidade.
View Convert float to string
function _format(num)
return num.toFixed(2).replace(".", ",").replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1.");
kafeltz / get-npm-package-version
Created Jul 15, 2016 — forked from DarrenN/get-npm-package-version
Extract version from package.json (NPM) using bash / shell
View get-npm-package-version
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
kafeltz / txt
Last active Oct 22, 2017
Fix ubuntu ć
View txt
Open the file: /etc/environment
Append this line: GTK_IM_MODULE=cedilla QT_IM_MODULE=cedilla
Restart the computer.
kafeltz / gist:cc1ccb82bc0301f6ef7f72cf01221cb1
Created Aug 23, 2019
Procedimento pra migrar do Mercurial pro Git
View gist:cc1ccb82bc0301f6ef7f72cf01221cb1
Criar o dockerfile abaixo
FROM ubuntu:latest
RUN apt-get update \
&& apt-get install -y \
&& apt-get install ssh -y \
&& apt-get install mercurial -y \
&& apt-get install git -y
kafeltz / .bashrc
Last active Mar 15, 2020
View .bashrc
alias ll='ls -lah -G'
alias gt='git status'
alias gd='git diff'
alias gb='git branch'
alias gla='git log --decorate --all --graph --stat'
alias gl='git log --decorate --graph --stat'
alias gf='git fetch --all'
export PATH="$(yarn global bin):$PATH"
export PATH=$PATH:/usr/local/go/bin
You can’t perform that action at this time.