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
#!/bin/bash | |
set -e | |
# Ask for password | |
read -s -p "Enter password for code server: " USER_PASSWORD </dev/tty | |
echo | |
# Install K3s | |
curl -sfL https://get.k3s.io | sh - | |
# Adjust permissions for K3s config |
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
// Available functions : | |
// | |
// page : https://pptr.dev/#?product=Puppeteer&version=v8.0.0&show=api-class-page | |
// Custom | |
// scrollToBottom | |
// scrollToSelector | |
await scrollToBottom(page); | |
await page.waitForSelector('iframe#dsq-app2953') | |
await scrollToBottom(page); |
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
// https://www.npmjs.com/package/node-html-parser | |
// htmlRoot gets injected and is available to your script | |
// Helper Functions: | |
// select:removeWhitespace().text & el.attributes.content | |
// selectAll: same as above | |
const result = [] | |
const list = Array.from(htmlRoot.querySelectorAll(':is(.AdvItemBox,.FreeListingItemBox)')) | |
for (const el of list) { | |
const isAd = !!el.querySelector('.AdvDetailsArea') |