function cpfMask(cleanValue) {
return cleanValue.replace(/^(\d{3})(\d{3})(\d{3})(\d{2}).*/, '$1.$2.$3-$4');
}
function cnpjMask(cleanValue) {
return cleanValue.replace(/^(\d{2})(\d{3})(\d{3})(\d{4})(\d{2}).*/, '$1.$2.$3/$4-$5');
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
set rtp+=~/.vim/bundle/Vundle.vim " set the runtime path to include Vundle | |
call vundle#begin() " and initialize | |
" Keep Plugin commands between vundle#begin/end. | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'kien/ctrlp.vim' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ROM ruby:2.2.3 | |
RUN apt-get update -qq && apt-get install -y build-essential | |
RUN apt-get install -y libpq-dev | |
RUN apt-get install -y ghostscript | |
RUN mkdir /app | |
WORKDIR /app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# curl - Raw upload | |
curl -X PUT -T image.png https://example.com/upload | |
# curl - Content-Type: multipart/form-data | |
curl -F name=logo -F [email protected] https://example.org/upload | |
# curl - POST presigned URL (S3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.map = null; | |
$scope.$on('mapInitialized', function(event, map) { | |
$scope.map = map; | |
}); | |
$scope.$on('cfpLoadingBar:completed', function () { | |
$timeout(function() { | |
google.maps.event.trigger($scope.map,'resize') | |
}, 1000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install RBenv in /opt/ for all users | |
echo '# == Rbenv ==' > /etc/profile.d/rbenv.sh | |
echo 'export RBENV_ROOT=/opt/rbenv' >> /etc/profile.d/rbenv.sh | |
echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh | |
echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh | |
chmod +x /etc/profile.d/rbenv.sh | |
source /etc/profile.d/rbenv.sh | |
curl https://raw.githubusercontent.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash |
NewerOlder