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 / functions.php
Last active June 15, 2022 20:09
this gist is to improve wp featured image and set description
<?php
function new_post_thumbnail_meta_box() {
global $post;
echo '<p class="howto">Tamanho recomendado: 1413px × 640px </p>';
$thumbnail_id = get_post_meta( $post->ID, '_thumbnail_id', true );
echo _wp_post_thumbnail_html( $thumbnail_id );
}
function render_new_post_thumbnail_meta_box() {
global $post_type;
@lucasprogamer
lucasprogamer / .htacess
Last active November 25, 2022 23:28
Add after # END WordPress.
#Força a utilizar Cache-Control e Expires header
<IfModule mod_headers.c>
Header unset ETag
</IfModule>
FileETag None
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 month"
ExpiresByType text/cache-manifest "access plus 0 seconds"
# Html
@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(' ')
@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: '&#x3c;Anterior',
nextText: 'Pr&oacute;ximo&#x3e;',
currentText: 'Hoje',
monthNames: ['Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho',
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
1 install with homebrew
- brew cask install ngrok
2 try run it
- ngrok http 80
Menu->Tools->Developer->New Snipper..
<!-- dd($object) -->
<snippet>
<tabTrigger>dd</tabTrigger>
<content><![CDATA[
dd(${1:this});
]]></content>
</snippet>
@lucasprogamer
lucasprogamer / estados-cidades.json
Created August 31, 2016 20:29 — forked from letanure/estados-cidades.json
JSON estados cidades
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="agnoster"
# Uncomment the following line to use case-sensitive completion.
@lucasprogamer
lucasprogamer / Fanpage Invite All People who Like your Posts
Last active June 9, 2016 20:52
Convidar quem curtiu um post do facebook
var inputs = document.querySelectorAll('a._42ft._4jy0._4jy3._517h');
for(var i=1; i<inputs.length;i++) {
inputs[i].click();
}
First destroy the VM's
vagrant global-status
vagrant destrou 'id-vm'
Second step create a new VM
vagrant box add laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead