Skip to content

Instantly share code, notes, and snippets.

View Nyveon's full-sized avatar
🎮
gaming

Eric K. Nyveon

🎮
gaming
  • Universidad de Chile
  • Santiago, Chile
  • 00:34 (UTC -03:00)
  • Bluesky @eric.tc
View GitHub Profile
@NicoToff
NicoToff / querySelector.ts
Last active February 13, 2025 23:46
Helpers to get and validate that DOM Elements with the right type
/**
* Selects an element from the DOM and asserts its type.
*
* This function throws if:
* - It is not found
* - It isn't an instance of the `HTMLElement` that is passed as second argument.
*
* @param selectors A standard `document.querySelector` string
* @param ElementClass A global class that extends `HTMLElement` or `SVGElement` (Optional, defaults to `HTMLElement`)
* @example const element = querySelector("#an-id"); // If found, will be inferred as `HTMLElement`
@Nyveon
Nyveon / RegistroCivilBot.py
Created December 29, 2022 02:07
Bot que te avisa por telegram cuando alguien anula un horario en el registro civil (cuando hay un horario mas temprano que el mas temprano anterior)
# Nyveon 2022
import requests
import datetime
import json
import logging
import asyncio
import telegram
from telegram.constants import ParseMode
# Telegram config