Skip to content

Instantly share code, notes, and snippets.

Ismael Santos Kafeltz kafeltz

Block or report user

Report or block kafeltz

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
@kafeltz
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
kafeltz / .bash_profile
Last active Mar 17, 2019
bash_profile
View .bash_profile
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 migrate='docker-compose run web ./manage.py migrate'
alias dock-custom='docker rm -f $(docker ps -a -q) && docker-compose -f docker-compose-local.yml up'
alias gf='git fetch --all'
@kafeltz
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.
https://askubuntu.com/questions/363115/how-to-type-latin-small-letter-c-with-cedilla
@kafeltz
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')
echo $PACKAGE_VERSION
@kafeltz
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
// http://blog.tompawlak.org/number-currency-formatting-javascript
// http://www.javascripter.net/faq/tofixed.htm
function _format(num)
{
return num.toFixed(2).replace(".", ",").replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1.");
}
You can’t perform that action at this time.