Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
// TODO: be life good

William Correa wilcorrea

🚀
// TODO: be life good
View GitHub Profile
@wilcorrea
wilcorrea / ProductTable.vue
Last active Mar 25, 2020
Fazer funcionar filtro conforme valor do combobox
View ProductTable.vue
<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 Mar 1, 2020 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command
View install-docker.md
View permissions.js
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
View 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 Aug 15, 2019 — forked from vinicius73/Dockerfile
Node project with PM2 and Docker
View Dockerfile
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 Jul 4, 2019 — forked from abdala/01_opcache.ini
Preload opcache in Dockerfile
View 01_opcache.ini
opcache.validate_timestamps=0
opcache.save_comments=0
opcache.enable_cli=1
opcache.enable_file_override=1
opcache.file_cache=/app/opcache
View http.js
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 — forked from erandirjunior/Authoriazation.js
Busca as permissões caso o usuário recarregue a página
View Authorization.js
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())
View BairroCadastro.vue
<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
@wilcorrea
wilcorrea / ShortIntroToScraping.rst
Created Feb 5, 2019 — forked from bradmontgomery/ShortIntroToScraping.rst
Really short intro to scraping with Beautiful Soup and Requests
View ShortIntroToScraping.rst
You can’t perform that action at this time.