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
| const fs = require('fs'), | |
| path = require('path'), | |
| fs_promise = fs.promises; | |
| async function walk(dir) { | |
| let files = await fs_promise.readdir(dir); | |
| files = await Promise.all(files.map(async file => { | |
| let filePath = path.join(dir, file); | |
| let stats = await fs_promise.stat(filePath); |
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
| =CONCATENATE("UPDATE edf_url_sourcing SET url = replace(url, '", A2, "', '", B2, "'), resource = replace(resource, '", A2, "', '", B2, "') where id = ", C2, ";") |
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
| ga(function(tracker) { | |
| console.log(tracker.b.data.w[':dimension5']); | |
| }); |
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 getStyle(oElm, strCssRule){ | |
| var strValue = ''; | |
| if (document.defaultView && document.defaultView.getComputedStyle) strValue = document.defaultView.getComputedStyle(oElm, '').getPropertyValue(strCssRule); | |
| else if (oElm.currentStyle){ | |
| strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){ return p1.toUpperCase(); }); | |
| strValue = oElm.currentStyle[strCssRule]; | |
| } | |
| return strValue; | |
| } |
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
| #To make Apache and NodeJS hold hands, add the following to httpd.conf | |
| LoadModule proxy_module modules/mod_proxy.so | |
| LoadModule proxy_http_module modules/mod_proxy_http.so | |
| ProxyPass /node http://localhost:3000/ | |
| #or whatever your designated node port is | |
| #CentOS server setup and common commands |
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 GetScreenCordinates(obj) { | |
| var p = {}; | |
| p.x = obj.offsetLeft; | |
| p.y = obj.offsetTop; | |
| while (obj.offsetParent) { | |
| p.x = p.x + obj.offsetParent.offsetLeft; | |
| p.y = p.y + obj.offsetParent.offsetTop; | |
| if (obj == document.getElementsByTagName("body")[0]) { | |
| break; | |
| } |
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
| $jq('.sticky').each(function(){ | |
| var sticky = $jq(this); | |
| $jq(window).scroll(function(){ | |
| if ($jq(window).width() > 600) { | |
| var t = $jq(sticky).parent().offset().top-20; | |
| var b = $jq('#content').offset().top + $jq('#content').height(); | |
| var w = $jq(sticky).width(); | |
| var h = $jq(sticky).height(); | |
| if ($jq(window).scrollTop() < t) $jq(sticky).css({'width':'auto','position':'static'}); | |
| else if ($jq(window).scrollTop() >= t && $jq(window).scrollTop() < b-h) $jq(sticky).css({'width':w,'position':'fixed','top':'20px','bottom':'inherit'}); |
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
| if ( !!( 'placeholder' in document.createElement('input') ) ) { | |
| //placeholder supported | |
| } |
NewerOlder