Skip to content

Instantly share code, notes, and snippets.

View leoborlot's full-sized avatar

Leo Borlot leoborlot

View GitHub Profile
<?php
/*
* @copyright 2019 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
@leoborlot
leoborlot / .env
Created July 10, 2023 17:52 — forked from cinco/.env
Postal - Clear Held with python
POSTAL_LOGIN=your-email
POSTAL_PASSWORD=your-pass
POSTAL_URL=http://your-postal-domain
POSTAL_ORGANIZATION=slug-of-your-organization
POSTAL_MAIL_SERVER=slug-of-mail-server
@leoborlot
leoborlot / wordpress-apache-hardening.md
Last active August 13, 2022 20:18 — forked from chesio/wordpress-apache-hardening.md
Some common rules to harden WordPress running on Apache webserver
@leoborlot
leoborlot / gist:ac06ac707e7ce193ef633e74cc53635b
Created January 17, 2021 14:39 — forked from avelino/gist:3188137
shell script, como colorir o retorno do seu código
echo -e " \033[0;30m Preto \033[0m --> 0;30 "
echo -e " \033[0;31m Vermelho \033[0m --> 0;31 "
echo -e " \033[0;32m Verde \033[0m --> 0;32 "
echo -e " \033[0;33m Marrom \033[0m --> 0;33 "
echo -e " \033[0;34m Azul \033[0m --> 0;34 "
echo -e " \033[0;35m Purple \033[0m --> 0;35 "
echo -e " \033[0;36m Cyan \033[0m --> 0;36 "
echo -e " \033[0;37m Cinza Claro \033[0m --> 0;37 "
echo -e " \033[1;30m Preto Acinzentado \033[0m --> 1;30 "
echo -e " \033[1;31m Vermelho Claro \033[0m --> 1;31 "
@leoborlot
leoborlot / Search my gists.md
Created December 16, 2020 22:31 — forked from santisbon/Search my gists.md
How to search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

Meu Dockerfile
FROM ribafs/ubuntu-maria
ENV MYSQL_ROOT_PASSWORD root
ENV MYSQL_ROOT_DATABASE testes
RUN apt-get update
EXPOSE 3306
ADD ["script.sql", "/tmp/script.sql"] # Cria o banco e muda a senha para vazia
CMD ["start-mysql"]
RUN mysql -uroot -p${MYSQL_ROOT_PASSWORD} -e "CREATE DATABASE testes"
@leoborlot
leoborlot / example.php
Created October 20, 2020 16:24 — forked from luizbills/example.php
Google Tag Manager in Elementor Canvas
// please, replace the GTM-XXXX
add_action( 'wp_head', 'custom_add_google_tag_manager_head', 0 );
function custom_add_google_tag_manager_head () {
?>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXX');</script>
@leoborlot
leoborlot / commands.php
Created September 17, 2020 22:26 — forked from escopecz/commands.php
Script to run Mautic (https://mautic.org) commands from a URL.
<?php
if (!isset($_GET['ILoveMauticReallyIDo'])) {
echo 'The secret phrase is wrong.';
die;
}
$link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$allowedTasks = array(
'cache:clear',
@leoborlot
leoborlot / README.md
Created July 7, 2020 03:12 — forked from deviantony/README.md
Portainer HTTP API by example

Introduction

This document presents a simple way to manage your Docker resource by using Portainer as a gateway (HTTP queries against the Portainer API).

The API documentation is available here: https://app.swaggerhub.com/apis/deviantony/portainer/

WARNING: This documentation is valid for Portainer >= 1.18.0.

NOTE: I'm using httpie to execute HTTP queries from the CLI.

@leoborlot
leoborlot / add-wp-user-to-mautic.php
Created April 23, 2020 19:27 — forked from luizeof/add-wp-user-to-mautic.php
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