This file contains hidden or 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 | |
| add_filter('widget_text', function( $content ) { | |
| $adsense = 'src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"'; | |
| if ( is_404() ) { | |
| $content = str_replace( $adsense, '', $content ); | |
| } | |
| return $content; | |
| }, 1 ); |
This file contains hidden or 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
| var tasks = [ | |
| function(resolve) { | |
| return setTimeout(function() { | |
| console.log(1); | |
| resolve(); | |
| }, 300); | |
| }, | |
| function(resolve) { | |
| return setTimeout(function() { | |
| console.log(2); |
This file contains hidden or 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
| addEventListener('fetch', event => { | |
| event.respondWith(handleRequest(event.request)) | |
| }) | |
| async function handleRequest(request) { | |
| const url = request.url + (request.url.indexOf('?')===-1 ? '?' : '&') | |
| const hook1Response = await fetch(url + 'workers_proxy_get=1', request) |
This file contains hidden or 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(ua){ | |
| var m = ua.match(/(msie|firefox|edge)/); | |
| if(m) document.documentElement.className += m[1]; | |
| })(navigator.userAgent.toLowerCase()) |
This file contains hidden or 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
| <script> | |
| (function(){ | |
| var request = new XMLHttpRequest(); | |
| request.open('GET', '/cdn-cgi/trace', true); | |
| request.onload = function() { | |
| if (request.status != 200) return; | |
| var match = request.responseText.match(/(colo|loc)=(\w+)/g), | |
| colo = match[0].split('=')[1], loc = match[1].split('=')[1]; | |
| ga('send', 'event', 'cloudflare', loc, colo); | |
| }; |
This file contains hidden or 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
| document.querySelectorAll("#toc li").forEach(function(li, idx){ | |
| if(li.innerText.indexOf('/SOME-PATH-YOU-WANT-TO-EXCLUDE/') === -1) | |
| return; | |
| var id = li.querySelector('a').href.split('#')[1]; | |
| var block = document.querySelector('a[name=' + id + ']').nextElementSibling; | |
| block.parentNode.removeChild(block); | |
| li.parentNode.removeChild(li); | |
| }); |
This file contains hidden or 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
| cd ~/tmp/ | |
| url1=https://... | |
| url2=https://... | |
| url3=https://... | |
| for i in {1..500000}; do | |
| time1=$(curl -o /dev/null -s -w %{time_total} $url1) | |
| time2=$(curl -o /dev/null -s -w %{time_total} $url2) |
This file contains hidden or 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
| /* | |
| setup: paste before ga('send', 'pageview'); | |
| features: | |
| - fix *.search.yahoo.com to Organic | |
| - fix Line and WeChat Apps to Social | |
| */ | |
| (function(r, M, S){ | |
| if(r.match(/^https?:\/\/\w+\.search\.yahoo\.com\//)) | |
| {ga('set',M,'Organic');ga('set',S,'Yahoo!');return} |
This file contains hidden or 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
| Country | CountryCode | Currency | Code | |
|---|---|---|---|---|
| New Zealand | NZ | New Zealand Dollars | NZD | |
| Cook Islands | CK | New Zealand Dollars | NZD | |
| Niue | NU | New Zealand Dollars | NZD | |
| Pitcairn | PN | New Zealand Dollars | NZD | |
| Tokelau | TK | New Zealand Dollars | NZD | |
| Australian | AU | Australian Dollars | AUD | |
| Christmas Island | CX | Australian Dollars | AUD | |
| Cocos (Keeling) Islands | CC | Australian Dollars | AUD | |
| Heard and Mc Donald Islands | HM | Australian Dollars | AUD |
NewerOlder