This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function(jQuery){ | |
function catalogLoad() { | |
let l = $("img[src*=photo]").filter(function(i){return this.naturalWidth==0; }).each(function(i){this.src=this.src}).length | |
console.log("try load "+l+" img") | |
if (l>0) { | |
setTimeout(catalogLoad, 3000); | |
} | |
} | |
setTimeout(catalogLoad, 3000); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# thanks https://github.com/wp-cli/wp-cli/issues/2217#issuecomment-158125933 | |
wp plugin install $(for p in `wp option get active_plugins --allow-root | grep '=>' | awk '{print $3}'` ; do echo $p | grep -oE "[^'/]+/"| grep -oE "[^/]+"; done) --allow-root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Enable or disable git hooks | |
#find .git/hooks/ -type f ! -name "*.*" | |
gitHooks=.git/hooks/ | |
echo "git Hooks $gitHooks" | |
option="${1}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Adblock Plus 2.0] | |
! Title: MrSwed. AdBlock List | |
! Url: https://gist.githubusercontent.com/MrSwed/e5cf1146523a17bbf1749fad4284dbc8/raw/AdBlock.txt | |
mail.yandex.ru##.ns-view-react-left-column~div | |
mail.yandex.ru##.ns-view-advanced-search-box+div | |
mail.yandex.ru##.ns-view-mail-pro-left-column-button | |
mail.yandex.ru##.ns-view-mail-pro-left-column-button~div |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Some Object caching of repeated sql queries for Woocommerce | |
* usage: `require_once( 'ext-caches.php' );` | |
* | |
* Author: MrSwed | |
* Author URI: https://gitlab.com/MrSwed | |
* | |
* */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( ! function_exists( "get_shippings" ) ) { | |
/** | |
* Get a list of currently available shipping services. | |
* https://gist.github.com/MrSwed/dce4b3dd462eb18d3e7a198d8dfd4321 | |
* | |
* @param mixed $filter instance_id if number, id if string, call it if it is function or array of fields for filter | |
* | |
* @return array | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /* fulW-pseudo | |
// https://gist.github.com/MrSwed/0ad54e2db2ad5231cedb459761af4e56 */ | |
// $mWidth:1142px; | |
@mixin fulW-pseudo($mW:$mWidth) { | |
content: ''; | |
position: absolute; | |
background: inherit; | |
top: 0; | |
bottom: 0; | |
left: -1vw; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Unparam url link parameters string 'key1=value1&key2=value2' to object {key1: 'value1', key2: 'value2'} | |
* https://gist.github.com/MrSwed/9164b1ffad0dfe33efdb3ca11b7377eb | |
* Usage: | |
* $("a").unparam() // return params from href {param1:"value1","param2":"value2"} | |
* $("div").unparam({"attr":"data-url"}) // return params from url at attr 'data-url' {param1:"value1","param2":"value2"} | |
* $("div").unparam("key1=value1&key2=value2"}) // return params from url at attr 'data-url' {param1:"value1","param2":"value2"} | |
* $.fn.unparam({"data":"key1=value1&key2=value2"}) // return {key1: 'value1', key2: 'value2'} | |
*/ | |
$.extend({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!defined('MODX_BASE_PATH')) { die('HACK???'); } | |
/** | |
* HeaderModifiedSince | |
* | |
* Return header "HTTP/1.0 304 Not Modified" if HTTP_IF_MODIFIED_SINCE | |
* | |
* @license GNU General Public License (GPL), http://www.gnu.org/copyleft/gpl.html | |
* @author Sergey Davydov <dev@sdcollection.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!defined('MODX_BASE_PATH')) die('HACK???'); | |
/** | |
* RedirectFriendly | |
* | |
* 301 Редирект с вложенных и наоборот ссылок (полезен при переключении настройки <b>Использовать вложенные URL</b>) | |
* | |
* @license GNU General Public License (GPL), http://www.gnu.org/copyleft/gpl.html | |
* @author MrSwed <webmaster@sdcollection.com> |
NewerOlder