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
#######################################################
################# MAUTIC 1.4.X #######################
######################################################
#
# orangeweb.com.br
# mautic 1.4.1
#
# MAUTIC14_SEGMENTS_UPDATE ~ 3 min
# MAUTIC14_CAMPAIGN_REBUILD ~ 3 min
@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
@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 / 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 / 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-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 / 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;
}
#!/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
#!/bin/bash
# Custom scripts here
echo "This is an extended entrypoint!"
# Run the original entrypoint located at
# /docker-entrypoint.sh
exec /docker-entrypoint.sh "$@"
@luizeof
luizeof / email.html
Created January 5, 2018 21:15 — forked from aziraphale/email.html
magic "Confirm Subscription" link in Google Inbox for Mailchimp subscription confirmation email
<!-- Google Inbox displayed a "Confirm Subscription" link button immediately below the subject line, both when the
email was opened and when it was closed. Clicking the button would confirm the subscription without the browser
visibly opening the confirmation link. -->
<span itemscope itemtype="http://schema.org/EmailMessage">
<span itemprop="description" content="We need to confirm your email address."></span>
<span itemprop="action" itemscope itemtype="http://schema.org/ConfirmAction">
<meta itemprop="name" content="Confirm Subscription">
<span itemprop="handler" itemscope itemtype="http://schema.org/HttpActionHandler">
<meta itemprop="url" content="https://carloop.us6.list-manage.com/subscribe/smartmail-confirm?u=...&id=...&e=...&inline=true">