Skip to content

Instantly share code, notes, and snippets.

View adrianoGaspar's full-sized avatar
🎯
Focusing

Adriano Gaspar da Silva adrianoGaspar

🎯
Focusing
View GitHub Profile
@adrianoGaspar
adrianoGaspar / app.js
Created December 29, 2020 17:21 — forked from michelmany/app.js
Vue.js 2 Vee-validate (pt-br) CPF Validation
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import VeeValidator, { Validator } from 'vee-validate'
import CpfValidator from './components/validators/cpf.validator'
import Dictionary from './components/validators/dictionary'
import Produto from './components/produtos.vue'
Validator.extend('cpf', CpfValidator)
@adrianoGaspar
adrianoGaspar / PdfCarne.php
Created August 26, 2020 00:56 — forked from ibrunotome/PdfCarne.php
Layout carnê para o laravel-boleto.
<?php
namespace App\Transformers;
use Eduardokum\LaravelBoleto\Boleto\Render\AbstractPdf;
use Eduardokum\LaravelBoleto\Contracts\Boleto\Boleto as BoletoContract;
use Eduardokum\LaravelBoleto\Contracts\Boleto\Render\Pdf as PdfContract;
use Eduardokum\LaravelBoleto\Util;
class PdfCarne extends AbstractPdf implements PdfContract
@adrianoGaspar
adrianoGaspar / gist:da5abd1025b96bb073e181a811a0c8a0
Last active January 26, 2018 15:32
Solução para o agendamento perdido do WordPress
<?php
//Basta criar um arquivo no wp-content/mu-plugins do blog para garantir que, contanto que haja visitas ao blog, //os posts agendados não sejam mais deixados para trás.
//A sugestão é que se crie no local acima indicado um arquivo chamado fix-missed-schedule.php
//(ou qualquer coisa que faça sentido só de olhar para o nome dele), com o conteúdo abaixo.
// Based on: http://wordpress.org/extend/plugins/wp-missed-schedule/
@define('MISSED_SCHEDULE_DELAY', 5);
@define('MISSED_SCHEDULE_OPTION', 'wp_missed_schedule');
function fix_missed_schedule() {
global $wpdb;