Skip to content

Instantly share code, notes, and snippets.

View dcatanzaro's full-sized avatar

Damian Catanzaro dcatanzaro

View GitHub Profile
@dcatanzaro
dcatanzaro / scrapper.js
Created February 18, 2024 21:18
Browser comments scrapper
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');
@dcatanzaro
dcatanzaro / botcito_galicia.js
Last active January 26, 2024 22:36
Botcito para el Galicia
const axios = require("axios");
let lastIndexMovement = 0;
const TELEGRAM_BOTID = "";
const TELEGRAM_CHATID = "";
class Telegram {
sendTelegramMessage(message) {
const botId = TELEGRAM_BOTID;
@dcatanzaro
dcatanzaro / widget.js
Last active August 30, 2024 18:00
Widget iOS: Feriados Argentina
//Twitter: @DamianCatanzaro
const widget = await createWidget();
if (config.runsInWidget) {
Script.setWidget(widget);
Script.complete();
} else {
widget.presentLarge();
}
@dcatanzaro
dcatanzaro / widget-html-css-scriptable-jobs.js
Last active September 1, 2024 22:06
Widget con HTML y CSS en Scriptable
//Twitter: https://twitter.com/DamianCatanzaro
const html = "<html> \
<head> \
<style> \
body { \
margin: 0; \
background-color: cyan; \
width: 500px; \
height: 500px; \
@dcatanzaro
dcatanzaro / poke.js
Last active November 12, 2021 14:42
Pokemon del día
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()}`;
@dcatanzaro
dcatanzaro / gist:163e2fe245b4df89e6179ba920754307
Created October 17, 2019 03:09
Instalar Docker en Ubuntu
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 -