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
#!/bin/bash | |
##################################################################################################### | |
# This script is meant to be used as a global smudge-clean filter for removing sensitive data # | |
# from your commits. # | |
# # | |
# 1. Place this script in an acceisble path, i.e. ~/scripts/git-smudge-clean-filter.sh. # | |
# # | |
# 2. Populate the 'mapArr' using what you need hidden as the key, and the replacment as the value. # | |
# DO NOT use same values for multiple keys (this will work only in one direction). # |
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
[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
/* | |
* 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
(function($){ | |
// Setup Ninja form - on Sumbit Yandex metric targeting. | |
$(document).on('nfFormSubmitResponse', function(e, r){ | |
var Target = "form-"+r.id, | |
YMVar = $(document.scripts).filter(function(){ return /w.yaCounter\d+/.test($(this).text()) }).text().replace(/^.*w.(yaCounter\d+)\s+.*$/im, "$1"); | |
if (YMVar && window[YMVar]) window[YMVar].reachGoal(Target); | |
}); | |
})(jQuery); |
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
// use in debug console browser | |
// | |
var $d=[]; | |
$(".comments__block").each(function(){ | |
var t = this, | |
dt = $(".comments__table__items__date",t).text().match(/(\d+)[-;:.,]?(\d+)[-;:.,]?(\d+) (\d+):(\d+):(\d+)?/); | |
var r = { | |
'title' : $(".comments__table__items__name",t).clone().children().remove().end().text(), | |
'tagid' :'', |
NewerOlder