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 csvToJson(csv){ | |
var delimiterRow = /\n/; | |
var delimiterCol = ','; | |
var rows=csv.split(delimiterRow).map(e=>e.trim()).filter(e=>e!==''); | |
var res=[]; | |
var names=[]; | |
for(var name of rows[0].split(delimiterCol).map(e=>e.trim())) names.push(name); | |
for(var i=1;i<rows.length;i++){ | |
var obj={} | |
var values = rows[i].split(delimiterCol).map(e=>e.trim()) |
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 getUrlQueryParams(url){ | |
return Object.fromEntries((new URLSearchParams(new URL(url).search))); | |
} |
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
Maca 500mg | 3g | |
Horny Goat Weed 500mg | |
Fenugreek | Bockshornklee 500mg | 350mg | |
Korean Ginseng 100mg | |
Ginkgo Bilboa 120mg | |
Tribulus Terrestris 750mg | |
Ashwaganda 300mg | |
Grünteeextrakt 250mg | |
(Rhodiola Rosea) 250mg | |
(Chinese astragalus 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
// https://github.com/necolas/normalize.css/blob/master/normalize.css | |
// https://github.com/sindresorhus/modern-normalize/blob/main/modern-normalize.css | |
// https://meyerweb.com/eric/tools/css/reset/ | |
// https://gist.github.com/marharyta/b83a3683085eb42867bbcefb34687af8 // Reboot css | |
// https://elad.medium.com/normalize-css-or-css-reset-9d75175c5d1e // typography | |
*,::before,::after{box-sizing:border-box} | |
html{line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent;-moz-tab-size:4;tab-size:4;font-size:16px} | |
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Roboto','Oxygen','Ubuntu','Fira Sans','Droid Sans','Helvetica Neue',sans-serif;font-weight:400;font-size:1rem;text-align:left;background-color:#fff} | |
[tabindex="-1"]:focus{outline:none!important} | |
h1{font-size:2rem} |
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
// Execute a function as soon as the website has loaded | |
// compatibility: ES3 | |
function loadScript(script) { | |
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len;_key++) { | |
args[_key - 1] = arguments[_key]; | |
} | |
if (document.readyState === "complete" || document.readyState === "interactive") { | |
script.apply(void 0, args); | |
} else { | |
document.addEventListener("DOMContentLoaded",script.bind.apply(script, [this].concat(args))); |
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
// throttle a function with requestanimationFrame | |
// throttledFunction = throttleAnimationFrame(func, immediate=false) | |
// which problem is solved? If you have a frequent event source you need to react | |
// to with a possible rerender of view components, then the function need to be executed | |
// with the next render frame but no more than once per render frame to save cpu cycles | |
// example: | |
// document.addEventListener('scroll',throttleAnimationFrame(eventHandler)) // will trigger at most once every render frame | |
var throttleAnimationFrame = (function(){ | |
var stack=new Map(); | |
var called=new Map(); |
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 isObject(o){return typeof o === "object" && o !==null} | |
function generatePatch(classNames){ | |
var result=''; | |
for(var className of classNames){ | |
// CookieStore | |
var classPatch=''; | |
if(className in window){ | |
classPatch+=`function ${className}(){}\n`; | |
var classPrototype=window[className].prototype; | |
var descriptors=Object.getOwnPropertyDescriptors(classPrototype); |
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
https://stackoverflow.com/questions/48011613/rendering-webgl-image-in-headless-chrome-without-a-gpu | |
(function(){ | |
var __getContext=HTMLCanvasElement.prototype.getContext; | |
Object.defineProperty(HTMLCanvasElement.prototype,'getContext',{ | |
configurable: true, | |
enumerable: true, | |
value: function getContext(contextType, contextAttributes={}){ | |
var options={ | |
premultipliedAlpha: false | |
} |
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
// https://arh.antoinevastel.com/reports/stats/menu.html | |
// https://news.ycombinator.com/item?id=20479015 | |
// https://github.com/JonasCz/How-To-Prevent-Scraping | |
// https://dzone.com/articles/5-puppeteer-tricks-that-will-make-your-web-scrapin | |
// https://github.com/infosimples/detect-headless | |
// https://antoinevastel.com/bot%20detection/2018/01/17/detect-chrome-headless-v2.html | |
// https://webscraping.pro/headless-chrome-detection-and-anti-detection/ | |
// https://stackoverflow.com/questions/55364643/headless-browser-detection | |
// https://github.com/infosimples/detect-headless | |
// https://bot.incolumitas.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
fastboot boot twrp-3.5.2_9-0-jasmine_sprout.img | |
adb reboot bootloader | |
fastboot flashing unlock | |
# adb boot into fastboot: | |
adb reboot bootloader | |
fastboot flash recovery twrp.img | |
# if error: FAILED (remote: '(recovery_b) No such partition') |