Skip to content

Instantly share code, notes, and snippets.

View luizeof's full-sized avatar
🎯
Focusing

Luiz Eduardo de Oliveira Fonseca luizeof

🎯
Focusing
View GitHub Profile
#!/bin/bash
# Custom scripts here
echo "This is an extended entrypoint!"
# Run the original entrypoint located at
# /docker-entrypoint.sh
exec /docker-entrypoint.sh "$@"
#!/bash/bin
git clone https://github.com/phpmyadmin/phpmyadmin.git
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
composer update --no-dev
@luizeof
luizeof / bloom-mautic.css
Created September 27, 2016 17:26
Aplica um ajuste para usar o formulário do mautic no Bloom
.mauticform-row{
display: inline !important;
}
.mauticform-input,
.mauticform-textarea,
.mauticform-selectbox {
width: 100% !important;
display: inline;
}
@luizeof
luizeof / add-async-to-wordpress.php
Created September 3, 2016 11:33
Adiciona o atributo async dentro de todos os scripts no array $scripts_to_async
<?php
function add_async_attribute($tag, $handle) {
// add script handles to the array below
$scripts_to_async = array('my-js-handle', 'another-handle');
foreach($scripts_to_async as $async_script) {
if ($async_script === $handle) {
return str_replace(' src', ' async="async" src', $tag);
}
}
@luizeof
luizeof / add-defer-wordpress.php
Created September 3, 2016 11:31
Adiciona o atributo defer em todos os scripts dentro do array $scripts_to_defer
<?php
function add_defer_attribute($tag, $handle) {
// add script handles to the array below
$scripts_to_defer = array('my-js-handle', 'another-handle');
foreach($scripts_to_defer as $defer_script) {
if ($defer_script === $handle) {
return str_replace(' src', ' defer="defer" src', $tag);
}
}
@luizeof
luizeof / add-wp-user-to-mautic.php
Last active October 10, 2023 23:07
add-wp-user-to-mautic.php
/**
* este código peguei aqui: https://medium.com/@jan_linhart/the-simplest-way-how-to-submit-a-form-data-to-mautic-1454d3afd005#.k5gmcrvjf
* Push data to a Mautic form
*
* Basicamente precisa ter um form do mautic com o campo email e este campo precisa se chamar "email"e
* depois alterar as linhas 19 e 21 com os seus dados
* e colar todo esse conteúdo dentro do functions do seu wordpress. só.
*
* @param array $data The data submitted by your form
@luizeof
luizeof / remove-old-sql-gz.sh
Created August 24, 2016 17:47
remove mautic older then 30 days backups
find ./my_dir/*.sql.gz -mtime +30 -type f -delete
@luizeof
luizeof / .htaccess
Last active August 20, 2016 10:44
Recomendações de Performance e Segurança para o .htaccess do seu site
#############
# EDITE SEU ARQUIVO .HTACCESS
# E COLE ESTE TEXTO NO FINAL
#############
## CACHE
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
#######################################################
################# MAUTIC 1.4.X #######################
######################################################
#
# orangeweb.com.br
# mautic 1.4.1
#
# MAUTIC14_SEGMENTS_UPDATE ~ 3 min
# MAUTIC14_CAMPAIGN_REBUILD ~ 3 min
@luizeof
luizeof / elementor-page.php
Last active December 7, 2017 12:23
Wordpress page template to use Elementor with any template
<?php
/**
* Template Name: Elementor
*
* @package WordPress
* @subpackage Orangeweb
* @since 1.0.0
*
* 2016 - Desenvolvido por Agência Orangeweb - www.orangeweb.com.br
*/