Skip to content

Instantly share code, notes, and snippets.

View erseco's full-sized avatar
馃挱
dG9udG8gZWwgcXVlIGxvIGxlYQ==

Ernesto Serrano erseco

馃挱
dG9udG8gZWwgcXVlIGxvIGxlYQ==
View GitHub Profile
# Bundle all files of a folder in a .txt to pass to AI genrators
find ./var/dir -type f -name "*.php" -exec echo "===== {} =====" \; -exec cat {} \; > ~/Downloads/budle.txt
@erseco
erseco / sicher.user.js
Last active January 24, 2025 11:28
sicher
// ==UserScript==
// @name Auto Fichaje SICHO
// @namespace https://gobiernodecanarias.net/
// @version 1.3
// @description Shows a floating panel to automate fichaje after detecting #thBienvenidaMensaje
// @match https://www3.gobiernodecanarias.net/aplicaciones/SICHO/*
// @updateURL https://gist.github.com/erseco/5ff0850ecff7c8ea16a9862e473b5dea/raw/6bae071265187149a84a8cf183074738fe164733/sicher.user.js
// @downloadURL https://gist.github.com/erseco/5ff0850ecff7c8ea16a9862e473b5dea/raw/6bae071265187149a84a8cf183074738fe164733/sicher.user.js
// @grant none
// ==/UserScript==
@erseco
erseco / gist:d3727c9baf39114018d798ca3123caa3
Created January 22, 2025 17:24
Instalacion de utilidades para Windows
# Lista de software a instalar
$softwareList = @(
@{ Name = "BleachBit"; Command = "BleachBit.BleachBit" },
@{ Name = "Bulk Crap Uninstaller"; Command = "Klocman.Bulk-Crap-Uninstaller" },
@{ Name = "UniGetUI"; Command = "uniget.uniget" },
@{ Name = "Microsoft PowerToys"; Command = "Microsoft.PowerToys" },
@{ Name = "WinMerge"; Command = "WinMerge.WinMerge" },
@{ Name = "CrystalDiskInfo"; Command = "CrystalDewWorld.CrystalDiskInfo" },
@{ Name = "SpaceSniffer"; Command = "Uderzo.SpaceSniffer" },
@{ Name = "NirLauncher"; Command = "NirSoft.NirLauncher" },
"""
Telegram Channel Identifier
Este script obtiene el ID de un canal de Telegram especificado por su t铆tulo.
Las variables de configuraci贸n se leen desde un archivo `.env`.
### Instrucciones:
1. Instala las dependencias necesarias:
pip install telethon python-dotenv
"""
Telegram Channel Media Downloader
Este script descarga archivos multimedia de un canal de Telegram especificado y evita descargar archivos ya existentes.
Las variables de configuraci贸n se leen desde un archivo `.env`.
### Instrucciones:
1. Instala las dependencias necesarias:
pip install telethon python-dotenv
@erseco
erseco / loteria.js
Created December 21, 2023 21:21
Comprobador loteria navidad 2023 con la web de rtve en javascript
//
// Comprobador de la loteria de navidad
//
// Ve a https://www.rtve.es/loterias/loteria-navidad/buscador/ abre la consola javascript del navegador y pega este c贸digo
//
// Lista de n煤meros y cantidades
const numeros = [
{ numero: "12345", cantidad: "20" },
{ numero: "54321", cantidad: "1" },
// ... A帽ade m谩s n煤meros y cantidades (sin decimales) aqu铆
/*
How to Use this Script in WordPress Multisite from the Browser Console
----------------------------------------------------------------------
1. Open the Site Creation Page: Log in to your WordPress Multisite network admin dashboard and navigate to the page where you add new sites.
2. Open the Browser Console: Right-click anywhere on the page and select "Inspect" or "Inspect Element", then go to the "Console" tab.
3. Paste the Script: Copy the entire script above and paste it into the console.
4. Execute the Script: Press Enter to run the script. It will start creating sites based on the user names defined in the users array.
@erseco
erseco / playlist-extractor.js
Created December 11, 2023 22:06
YouTube Studio Playlist URL and Title Extractor
// YouTube Studio Playlist URL and Title Extractor
// This script is designed to run in the browser console while you're on the YouTube Studio playlist page.
// It extracts the URLs and titles of all playlists in the current view. The script is particularly useful
// for channel managers and content creators who need to quickly gather information about their playlists
// for cataloging, backup, or analysis purposes.
// How It Works:
// - The script queries the document for all anchor (<a>) elements that contain '/playlist/' in their href attribute.
@erseco
erseco / cas.sh
Last active September 22, 2023 11:48
This script automates authentication for systems using Apereo CAS (Central Authentication Service). It logs in via command-line, useful for tasks/testing. More on Apereo CAS: github.com/apereo/cas
#!/bin/bash
# Usage: cas.sh {url} {username} {password}
# If you have any errors, try removing the redirects to get more information.
# Encode the destination URL using curl
DEST="${1}"
ENCODED_DEST=$(curl -Gso /dev/null -w %{url_effective} --data-urlencode "" "${DEST}" | cut -d'?' -f2)
# CAS server details
@erseco
erseco / calculadora.c
Created April 19, 2021 18:38
Ejercicio de las oposiciones informatica andaluc铆a 2018
#include <stdio.h>
/* Funci贸n para sumar, acepta dos valores de entrada y devolver谩 el resultado de la operaci贸n */
int sumar(int, int);
/* Funci贸n para restar, acepta dos valores de entrada y devolver谩 el resultado de la operaci贸n */
int restar(int, int);
/* Funci贸n para multiplicar, acepta dos valores de entrada y devolver谩 el resultado de la operaci贸n */
int multiplicar(int, int);