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 | |
# bash web crawler | |
# $ bash crawl.sh http://example.com 1 | |
# NOTE: this version ignores static files, see in last pipe of the visit function | |
# TODO: | |
# 1. avoid loops by calling same urls ony once per entire script | |
# 2. do not use txt lists |
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
((els) => { | |
function HPicker(el) { | |
var self = this; | |
this.wrapSize = Math.max(parseInt(el.getAttribute('data-size') || 0), 100); | |
this.mainFontSize = this.wrapSize / 10; | |
this.spaceForCirculareText = 1.3; | |
this.canvasSize = this.wrapSize - 2*(this.mainFontSize * this.spaceForCirculareText); | |
el.insertAdjacentHTML("afterEnd", |
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
document.body.insertAdjacentHTML("beforeEnd",'<div id="blurme" style="position: fixed;z-index: 999;background: rgba(255,255,255,.1);height: 100px;width:100px;margin:-50px 0 0 -50px;backdrop-filter: blur(5px);border-radius: 5em;"></div>');window.bbb = document.getElementById('blurme');document.body.onmousemove = (e) => {window.bbb.style.left=e.clientX+"px";window.bbb.style.top=e.clientY+"px"} |
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(){ | |
function getShadowRoots(wrap) { | |
if (!wrap) return []; | |
var found = []; | |
var els = wrap.querySelectorAll('*'); | |
for (var i=0; i < els.length; i++) { | |
if (els[i].shadowRoot) found.push(els[i].shadowRoot); | |
} | |
return found; |
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
// LAZY LOAD FOR IMAGES | |
// make it global so minifier can minify correctly | |
window.doLoadLazy = function(){}; | |
var initLazyLoad = function(){ | |
// set this as the preload you want to have to load image before they appear in the viewport | |
// accepts only INT | |
var offsetPreLoad = 200; |