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
  • 17:20 (UTC -03:00)
  • Bluesky @eric.tc
View GitHub Profile
@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
@Nyveon
Nyveon / binary_racer_turing_complete.py
Last active June 27, 2023 00:59
Bot for the BinaryRacer minigame in Turing Complete
import time
from pynput import keyboard
kb = keyboard.Controller()
current_value = ''
def input_binary(value: str) -> None:
print(value)
value = int(value)
@Nyveon
Nyveon / cl_domain_scraper.py
Last active September 29, 2023 13:15
Tool for scraping available .cl domains with a specific length and character set. (Useful for finding short or OG names)
import itertools
import requests
import time
from bs4 import BeautifulSoup
# Config
LENGTH = 1
CHARS = "abcdefghijklmnopqrstuvwxyz0123456789"
URL = "https://www.nic.cl/registry/Whois.do?d="
OUTPUT = "available.txt"
@Nyveon
Nyveon / portalinmobiliario_uf_to_clp.js
Created January 30, 2024 00:53
Converts Portal Inmobiliario prices from UF to CLP, intended as a bookmarklet or userscript.
/* Readable version */
(async () => {
const apiResponse = await fetch('https://mindicador.cl/api');
const jsonData = await apiResponse.json();
const PRECIOUF = jsonData.uf.valor;
const priceElements = document.querySelectorAll('.andes-money-amount__fraction');
priceElements.forEach((elem) => {
const ufSymbolElement = elem.previousElementSibling;
@Nyveon
Nyveon / mercadolibre_precio_por_gramo.js
Created March 15, 2024 01:49
Adds a simple price per gram display next to the price of products on mercadolibre.
/* Readable Version */
javascript:(function(){
const products = document.querySelectorAll('.shops__layout-item');
products.forEach(product => {
const title = product.querySelector('section').ariaLabel;
const massMatch = title.match(/(\d+(?:\.\d+)?)(g|gr|kg)/);
if (!massMatch) return;
let mass = parseFloat(massMatch[1]);
if (massMatch[2] === 'kg') mass *= 1000;