Skip to content

Instantly share code, notes, and snippets.

View marlonassuncao's full-sized avatar

Marlon Assunção marlonassuncao

View GitHub Profile
@marlonassuncao
marlonassuncao / keep_utm_queries.php
Created July 19, 2023 15:40 — forked from ricalamino/keep_utm_queries.php
Keep UTM in Wordpress - Put in functions.php
<?php
function add_my_query_var( $link, $query ) {
$utm_source = $_GET['utm_source']; //get sort value
if ( isset($utm_source) ) { //if browsing posts by votes
$link = add_query_arg( 'utm_source', $utm_source, $link );
}
$utm_medium = $_GET['utm_medium']; //get sort value
if ( isset($utm_medium) ) { //if browsing posts by votes
$link = add_query_arg( 'utm_medium', $utm_medium, $link );
@marlonassuncao
marlonassuncao / select-estados-brasileiros.html
Created December 27, 2022 20:19 — forked from ppcdias/select-estados-brasileiros.html
Select com todos os estados brasileiros para HTML ou Contact Form 7
<!-- Versão Estado e UF para Contact Form 7 -->
[select* estado first_as_label "Selecione o estado" "Acre (AC)" "Alagoas (AL)" "Amapá (AP)" "Amazonas (AM)" "Bahia (BA)" "Ceará (CE)" "Distrito Federal (DF)" "Espírito Santo (ES)" "Goiás (GO)" "Maranhão (MA)" "Mato Grosso (MT)" "Mato Grosso do Sul (MS)" "Minas Gerais (MG)" "Pará (PA) " "Paraíba (PB)" "Paraná (PR)" "Pernambuco (PE)" "Piauí (PI)" "Rio de Janeiro (RJ)" "Rio Grande do Norte (RN)" "Rio Grande do Sul (RS)" "Rondônia (RO)" "Roraima (RR)" "Santa Catarina (SC)" "São Paulo (SP)" "Sergipe (SE)" "Tocantins (TO)"]
<!-- Versão somente UF para Contact Form 7 -->
[select* estado first_as_label "Selecione o estado" "AC" "AL" "AP" "AM" "BA" "CE" "DF" "ES" "GO" "MA" "MT" "MS" "MG" "PA" "PB" "PR" "PE" "PI" "RJ" "RN" "RS" "RO" "RR" "SC" "SP" "SE " "TO"]
<!-- Versãoe Estado e UF para HTML -->
<select id="estado" name="estado">
<option value="Selecione seu estado" selected disabled>Selecione seu estado</option>
<option value="Acre (AC)">Acre (AC)</option>
@marlonassuncao
marlonassuncao / ActivityPublishNotification.php
Last active December 2, 2022 15:10
ActivityPublishNotification.php
<?php
/**
* Register New custom automatic push notification.
*/
namespace BuddyBossApp\Custom;
use BuddyBossApp\Jobs;
use BuddyBossApp\Notification\IntegrationAbstract;
/**
@marlonassuncao
marlonassuncao / functions.php
Last active December 2, 2022 15:09
functions.php
<?php
require_once 'ActivityPublishNotification.php';
use BuddyBossApp\Jobs;
use BuddyBossApp\Notification\IntegrationAbstract;
add_action('bp_activity_after_save', 'where_activity_from', 10, 3);
function where_activity_from( $activity ) {
// print_r($activity->content);
$users = get_users( array(
'fields' => 'ids',
'number' => 200,
@marlonassuncao
marlonassuncao / wp-security-checklist.md
Last active November 26, 2021 11:00 — forked from Wiz-Amit/wp-security-checklist.md
WordPress Security Checklist
@marlonassuncao
marlonassuncao / AdobeAMDFix.md
Created September 28, 2021 23:44 — forked from naveenkrdy/AdobeAMDFix.md
To fix adobe products crashes on AMD hackintosh

Adobe Crash Fix XLNC

Instructions

  1. Install needed adobe apps from adobe creative cloud.

  2. Open Terminal.

  3. Copy-paste the below command to your terminal and run it (enter password when asked).

@marlonassuncao
marlonassuncao / .htaccess
Created September 13, 2019 19:01 — forked from seoagentur-hamburg/.htaccess
UPDATE 2019/07: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2019
# ----------------------------------------------------------------------
# @Author: Andreas Hecht
# @Author URI: https://andreas-hecht.com
# License: GNU General Public License v2 or later
# License URI: http://www.gnu.org/licenses/gpl-2.0.html
########################################################################
sudo chown -R hofbraubh:nogroup /var/www/
sudo chown -R www-data:www-data /var/www/folder
@marlonassuncao
marlonassuncao / utf8.sql
Last active December 11, 2015 12:59
Alterar charset mysql
ALTER TABLE $table CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci