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
let comments = []; | |
let lastScrollHeight = 0; | |
let interval = setInterval(() => { | |
// Scroll down to load more comments | |
window.scrollTo(0, document.body.scrollHeight); | |
// Wait for new comments to load | |
setTimeout(() => { | |
// Select all comments | |
let commentElements = document.querySelectorAll('[data-testid="tweetText"] span.css-1qaijid.r-bcqeeo.r-qvutc0.r-poiln3'); |
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
const axios = require("axios"); | |
let lastIndexMovement = 0; | |
const TELEGRAM_BOTID = ""; | |
const TELEGRAM_CHATID = ""; | |
class Telegram { | |
sendTelegramMessage(message) { | |
const botId = TELEGRAM_BOTID; |
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
//Twitter: @DamianCatanzaro | |
const widget = await createWidget(); | |
if (config.runsInWidget) { | |
Script.setWidget(widget); | |
Script.complete(); | |
} else { | |
widget.presentLarge(); | |
} |
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
//Twitter: https://twitter.com/DamianCatanzaro | |
const html = "<html> \ | |
<head> \ | |
<style> \ | |
body { \ | |
margin: 0; \ | |
background-color: cyan; \ | |
width: 500px; \ | |
height: 500px; \ |
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
const numberDay = () => { | |
const now = new Date(); | |
const start = new Date(now.getFullYear(), 0, 0); | |
const diff = now - start; | |
const oneDay = 1000 * 60 * 60 * 24; | |
const day = Math.floor(diff / oneDay); | |
return day; | |
}; | |
const pokemonUrl = `https://pokeapi.co/api/v2/pokemon/${numberDay()}`; |
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
sudo apt-get update | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - |