Skip to content

Instantly share code, notes, and snippets.

View lucasprogamer's full-sized avatar
🕶️
Working on Code

Lucas lucasprogamer

🕶️
Working on Code
View GitHub Profile
@lucasprogamer
lucasprogamer / ui.datepicker-pt-BR.js
Created July 25, 2017 18:39 — forked from Senhordim/ui.datepicker-pt-BR.js
Tradução datepicker pt-BR
/* Brazilian initialisation for the jQuery UI date picker plugin. */
/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */
jQuery(function($){
$.datepicker.regional['pt-BR'] = {
closeText: 'Fechar',
prevText: '<Anterior',
nextText: 'Próximo>',
currentText: 'Hoje',
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
@lucasprogamer
lucasprogamer / Vagrantfile
Created July 30, 2017 21:52
Setting vagrant-hostmanager
if Vagrant.has_plugin? 'vagrant-hostmanager'
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.manage_guest = true
config.vm.provision :hostmanager
settings = YAML::load(File.read(homesteadYamlPath))
config.hostmanager.aliases = settings['sites'].map { |item| item['map'] }
puts "hostmanager aliases: " + config.hostmanager.aliases.join(' ')
<?php
function devplus_attachments_wpquery_where( $where ){
if( is_user_logged_in() ){
// we spreken over een ingelogde user
if( isset( $_POST['action'] ) ){
// library query
if( $_POST['action'] == 'query-attachments' ){
$where .= ' AND post_parent != 0';
}
@lucasprogamer
lucasprogamer / main.js
Created May 21, 2018 20:03
CF7 Bulma Ajax-loader icon
/**
* when cf7 ajax-loader
* @param {[type]} form [description]
* @return {[type]} [description]
*/
wpcf7.submit = function( form ) {
if ( typeof window.FormData !== 'function' ) {
return;
}
@lucasprogamer
lucasprogamer / set-robot-git-ftp.md
Created June 22, 2018 18:58
git ftp no setrobot

.git-ftp-ignore | Conteúdo abaixo

bower_components/* node_modules/*

.git-ftp-include | Conteúdo abaixo

vendor/:composer.lock

Dentro da pasta .git, checar arquivo config

bower_components/*
node_modules/*
@lucasprogamer
lucasprogamer / php.mdown
Created June 25, 2018 15:10
malformed header from script. Bad header=&lt;br /&gt;: index.php

this error happens because exists tags from olds version of PHP

check if exists in php.ini and remove or comment allow_call_time_pass_reference

check if exist any tag unable in php 7.1 like

;asp_tags = Off ;register_globals = Off

version: '2'
# Named volumes
volumes:
# MySQL Data
wordpress-mysql-data:
driver: local
# Redis Data
<?php
namespace App\Lib;
use Utils;
class BulmaWalker extends \Walker_Nav_Menu
{
private $cpt; // CPT, is current post a custom post type
private $archive; // Stores the archive page for current URL
public function __construct()
@lucasprogamer
lucasprogamer / center.css
Last active March 26, 2019 16:48
Center Element vertical and Horizontal
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;