Skip to content

Instantly share code, notes, and snippets.

View wilcorrea's full-sized avatar
🚀
// TODO: be life good

William Correa wilcorrea

🚀
// TODO: be life good
View GitHub Profile
@wilcorrea
wilcorrea / post-receive.sh
Created February 4, 2021 07:33 — forked from lfalmeida/post-receive.sh
Hook post receive com push options
#!/bin/sh
# ---- Config
ENV_NAME="Homologação"
TAG_SUFFIX="homolog"
PROJECT_NAME="Scania Journey Event"
PROJECT_PATH_HOST="/home/lfalmeida/Projects/GitHooks/prod/"
PROJECT_PATH_DOCKER="/src/projeto"
SLACK_WEBHOOK=""
ENABLE_SLACK_POST=0
@wilcorrea
wilcorrea / ProductTable.vue
Last active March 25, 2020 19:19
Fazer funcionar filtro conforme valor do combobox
<template>
<va-card :title="$t('menu.products')">
<div class="row">
<div class="flex xs12 md4">
<va-input
:value="term"
:placeholder="$t('tables.searchByProduct')"
@input="search"
removable
>
@wilcorrea
wilcorrea / install-docker.md
Created March 1, 2020 14:49 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command
import $store from '../store'
const remove = (vnode) => vnode.elm.parentElement.removeChild(vnode.elm)
export default {
install (Vue) {
Vue.directive('permission', {
inserted (el, binding, vnode) {
if (binding.arg !== 'can') {
return
@wilcorrea
wilcorrea / xpto.php
Last active January 16, 2020 11:46 — forked from dersonsena/xpto.php
<?php
class Xpto
{
public function addPoints($amount)
{
return $this->processPoints($amount, function ($amount, $currentPointsAvailable, $conversionRate) {
return $currentPointsAvailable + ($amount * $conversionRate)
});
}
@wilcorrea
wilcorrea / Dockerfile
Created August 15, 2019 20:01 — forked from vinicius73/Dockerfile
Node project with PM2 and Docker
FROM node:10.15-alpine as base
RUN apk --no-cache --virtual build-dependencies add \
python \
make \
g++ \
&& rm -f /var/cache/apk/* \
&& npm config set unsafe-perm true \
&& npm install --quiet node-gyp -g --cache /tmp/empty-cache
@wilcorrea
wilcorrea / 01_opcache.ini
Created July 4, 2019 21:31 — forked from abdala/01_opcache.ini
Preload opcache in Dockerfile
opcache.validate_timestamps=0
opcache.save_comments=0
opcache.enable_cli=1
opcache.enable_file_override=1
opcache.file_cache=/app/opcache
import axios from 'axios'
// window.axios = require('axios')
import config from '@/config'
import JwtToken from '@/services/jwt-token'
import $store from '@/store'
import config from '@/config'
const http = axios.create({
baseURL: config.apiUrl,
// timeout: 1000,
@wilcorrea
wilcorrea / Authorization.js
Last active May 2, 2019 12:00 — forked from erandirjunior/Authoriazation.js
Busca as permissões caso o usuário recarregue a página
export default ({router, store, Vue}) => {
router.beforeEach((to, from, next) => {
const authorization = to.meta.authorization
if (!authorization) {
next()
return
}
let permissions = store.dispatch('auth/checkPermission')
.then(() => next())
<template>
<pl-form
title="Cadastro de Bairro"
@close="fecharBairroCadastro()"
class="w-90-tb w-80-dt w-60-lg w-45-xl maximize-tb-down"
:blocked="bloqueado"
>
<div class="bar mt-3">
<pl-input v-model="objBairro.no_municipio" label="Município" class="wf-auto blocked"></pl-input>
<pl-switch