Skip to content

Instantly share code, notes, and snippets.

@positiveque
positiveque / lead_form_utm_params.js
Created March 26, 2019 20:09 — forked from hedleysmith/lead_form_utm_params.js
Store UTM params & referrer UTL as subscriber fields on MailChimp form
// $(document).ready() replacement.
function ready(fn) {
if (document.readyState != 'loading'){
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
}
// Get UTM params from URL to pass to Mailchimp. Store in localStorage so they follow the user around the site.
@positiveque
positiveque / README.md
Created October 19, 2017 12:56
Отключаем сбор статистики и http://bitrix.info/bx_stat на всех страницах сайта

В файл /bitrix/.settings_extra.php нужно добавить:

<?php
return array(
	'analytics_counter' => array(
		'value' => array(
			'enabled' => false
		),
 'readonly' =&gt; false,
/*
Works best for background images with set dimensions
Just add a ".pngfix" class to anything you want fixed
or put in some other jQuery selector.
*/
$('.pngfix').each( function() {
$(this).attr('writing-mode', 'tb-rl');
$(this).css('background-image', 'none');
$(this).css( 'filter', 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="path/to/image.png",sizingMethod="scale")');
});
http {
map $http_user_agent $limit_bots {
default '';
~*(google|bing|yandex|msnbot) $binary_remote_addr;
}
limit_req_zone $limit_bots zone=bots:10m rate=1r/m;
server {