Skip to content

Instantly share code, notes, and snippets.

Avatar

Vladimír Smitka lynt-smitka

View GitHub Profile
View CF7 - GTM
<script>
document.addEventListener( 'wpcf7mailsent', function( event ) {
window.dataLayer.push({
"event" : "cf7submission",
"formId" : event.detail.contactFormId,
"response" : event.detail.inputs
})
});
</script>
View Synology x86
Active Backup for Business
Active Backup for G Suite
Active Backup for Office 365
Antivirus by McAfee
Archiware P5
Archiware Pure
Central Management System
Data Deposit Box
Synology Directory Server
Docker
View rubrika_ontop.php
function lynt_rubrika_checked_ontop($args){
$args['checked_ontop'] = false;
return $args;
}
add_filter('wp_terms_checklist_args','lynt_rubrika_checked_ontop');
View wp-config-debug.php
define( 'WP_DEBUG', true );
define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true );
@lynt-smitka
lynt-smitka / wp-config-part-1-show.php
Last active Mar 9, 2021
Display/Log WordPress errors
View wp-config-part-1-show.php
define( 'WP_DEBUG', true );
define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true );
View ip_block_mu_plugin_gui.php
<?php
function get_real_client_ip()
{
$ipaddress = '';
if (isset($_SERVER['HTTP_CLIENT_IP']))
$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
View ip_block_mu_plugin.php
<?php
function get_real_client_ip()
{
$ipaddress = '';
if (isset($_SERVER['HTTP_CLIENT_IP']))
$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
View web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="webp">
<match url="(.+)\.(jpe?g|png)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_ACCEPT}" pattern="image/webp" ignoreCase="false" />
<add input="{DOCUMENT_ROOT}/{R:1}.webp" matchType="IsFile" />
@lynt-smitka
lynt-smitka / 1-common.txt
Last active Feb 25, 2021
Dir buster lists
View 1-common.txt
info.php
phpinfo.php
php_info.php
php-info.php
i.php
test.php
debug.php
admin.php
administrace.php
administration.php