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
// | |
// 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í |
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
/* | |
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. |
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
// 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. |
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
#!/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 |
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
#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); |
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
// Código para realizar el sorteo de bolas de una oposición a Profesor de Enseñanza Secundaria, Especialidad Informática | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <time.h> | |
// Colores ansi para la consola | |
#define BLACK "\033[0m" | |
#define RED "\033[31m" | |
#define GREEN "\033[32m" |
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
git clone git@bitbucket.org:exolever/exolever.git | |
git clone git@bitbucket.org:exolever/exo-services.git | |
cd exolever | |
mkdir service-exo-core | |
git mv !(service-exo-core) service-exo-core | |
git commit -a -S -m "Moving exolever into its own subdirectory (service-exo-core)" | |
cd ../exo-services |
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
#comando para UNIX | |
curl -s --data "user=XXXXX@correo.ugr.es&pass=TUPASSWORD" https://vpn.ugr.es | perl -n -e '/cgi.*&p=(.{0,12})/ && print "$1\n"' | |
#comando para MACOSX que además copia el password en el portapapeles | |
curl -s --data "user=XXXXX@correo.ugr.es&pass=TUPASSWORD" https://vpn.ugr.es | perl -n -e '/cgi.*&p=(.{0,12})/ && print $1' | pbcopy | |
pbpaste | |
echo |
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
actions <- c("N", "S", "E", "W") | |
x <- 1:4 | |
y <- 1:3 | |
rewards <- matrix(rep(0, 12), nrow=3) | |
rewards[2, 2] <- NA | |
rewards[1, 4] <- 1 | |
rewards[2, 4] <- -1 |
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
// Diseñar una función orden int orden(list<int> L) que devuelva 1 si L está ordenada de forma ascendente de principio a fin, 2 si lo está de forma descendente y 0 si no está ordenada de ninguna forma. | |
int orden(list<int> L) | |
{ | |
int resultado = 0; | |
list<int>::iterator it = L.begin(); | |
int ant = *it; | |
++it; |
NewerOlder