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
async function handleRequest(stop_requested) { | |
if (stop_requested > 1 && stop_requested < 99999) { | |
console.log("OK - " + stop_requested) | |
const destinationURL = 'https://www.emtmadrid.es/PMVVisor/pmv.aspx?stopnum=' + stop_requested + '&size=3&utm_source=pglez'; | |
return Response.redirect(destinationURL, 302); | |
} else { | |
console.log("NOK - " + stop_requested) | |
const html = `<html> <head> <meta charset="utf-8"> <title>Visor de tiempos EMT</title> <style>body{font-family: 'Open Sans', 'Helvetica Neue', sans-serif;}img{max-width: 100vw; max-height: 100vw;}</style> </head> <body> <h1>Error en la petición</h1> <h2>Introduzca únicamente el número de parada como parámetro</h2> <br><img src="https://pub-e7a754c25f58400c88dabdb9d5a5b990.r2.dev/banner_emt_glez.png" alt="Imagen de ejemplo"> </body></html>` | |
return new Response(html, { | |
headers: { |
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
/** | |
* | |
* Alumno: Pablo Gonzalez Troyano | |
* Grado en Ciencia, Gestion e Ingenieria de Servicios (Semipresencial) | |
* | |
* ENUNCIADO DEL EJERCICIO | |
* | |
* Un Agricultor se dedica a la cria de Conejos. Compra 240 Conejos aptos para reproducirse. | |
* Por la experiencia de mas de 20 annos que lleva en el negocio, sabe que cada mes nacen | |
* entre 2 y 45 conejos jovenes que no estan aptos para reproducirse, pero lo seran |
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
/** | |
* | |
* Alumno: Pablo Gonzalez Troyano | |
* Grado en Ciencia, Gestion e Ingenieria de Servicios (Semipresencial) | |
* | |
* ENUNCIADO DEL EJERCICIO | |
* | |
* Un agricultor se dedica a la cria de pollos en su finca. Compra 240 pollos, | |
* gallinas y gallos, aptos para reproducirse. Por la experiencia de mas de 20 annos | |
* sabe que cada mes nacen entre 2 y 50 pollos. Ademas, mueren ente 1 y 5 pollos. |
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
{"fw":5020,"mver":"2.2.1","lts":43,"dst_name":"34.140.152.85","af":4,"dst_addr":"34.140.152.85","src_addr":"192.168.10.6","proto":"ICMP","ttl":55,"size":48,"result":[{"rtt":31.469868},{"rtt":31.909145},{"rtt":32.286958}],"dup":0,"rcvd":3,"sent":3,"min":31.469868,"max":32.286958,"avg":31.888657,"msm_id":41688561,"prb_id":1000650,"timestamp":1654959318,"msm_name":"Ping","from":"79.156.126.125","type":"ping","group_id":41688561,"step":null,"stored_timestamp":1654959319} | |
{"fw":5020,"mver":"2.2.1","lts":43,"dst_name":"34.140.152.85","af":4,"dst_addr":"34.140.152.85","src_addr":"172.18.1.17","proto":"ICMP","ttl":53,"size":48,"result":[{"rtt":28.36906},{"rtt":26.944174},{"rtt":27.921119}],"dup":0,"rcvd":3,"sent":3,"min":26.944174,"max":28.36906,"avg":27.7447843333,"msm_id":41688561,"prb_id":1000961,"timestamp":1654959318,"msm_name":"Ping","from":"83.38.84.45","type":"ping","group_id":41688561,"step":null,"stored_timestamp":1654959321} | |
{"fw":5040,"mver":"2.4.1","lts":11,"dst_name":"34.140.152.85","af":4,"dst_addr":"3 |
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 | |
# This script is made to programmatically update a DNS record managed on Cloudflare via its API. | |
# CC BY 4.0 Pablo González Troyano - 2022 | |
# The script is provided “AS IS” Without warranty of any kind. // Based on cloudflare-ddns-update.sh by Trash2. | |
# CF API Documentation: https://api.cloudflare.com/ | |
# Update the following variables as needed. |
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
DELIMITER ## | |
CREATE PROCEDURE ComprobarClientes() | |
BEGIN | |
DECLARE C1 CURSOR FOR | |
SELECT pedidos.cli_no,count(*) | |
FROM pedidos,clientes | |
WHERE pedidos.cli_no = clientes.cli_no | |
AND (clientes.localidad = 'SEVILLA' OR clientes.localidad = 'CADIZ') | |
AND (pedidos.producto_no BETWEEN 10 AND 30) |
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
RARO | |
CREATE TABLE IF NOT EXISTS Pedir_Productos ( | |
id INT(2) PRIMARY KEY | |
); | |
DELIMITER ## | |
DROP FUNCTION IF EXISTS productos_vendidos_semana## |
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
DELIMITER ## | |
DROP PROCEDURE IF EXISTS act_jefe## | |
CREATE PROCEDURE act_jefe(IN dir_anti VARCHAR(9), | |
IN dir_nuevo VARCHAR(9)) | |
BEGIN | |
DECLARE num_filas INT DEFAULT 0; | |
DECLARE cuenta_bucle INT DEFAULT 0; |
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
foreach ($linea in Get-Content 'Z:\Comandos PS\dominioASO.txt'){ | |
$campos = $linea.Split("#") | |
$apellido = $campos1 | |
$ruta = "OU="+$campos[3]+","+"DC=ASO,DC=LOCAL" | |
[string]$samid = $campos[2] | |
$ou = $campos[3] | |
$existe = 'n' |
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
Julian#Vallejo Segura#JULVALSEG#MADRID#625817414#AdministracionMadrid#Calle de Julian | |
Cristina#Cortes Alonso#CRISCORALO#MADRID#624567424#AdministracionMadrid#Calle de Cristina | |
Roberto#Torres Montes#ROBTORMON#MADRID#621231241#AdministracionMadrid#Calle de Roberto | |
Gloria#Pizarro Perez#GLOPIZPER#MADRID#642231353#DesarrolloMadrid#Calle de Gloria | |
Fernando#Felix Ruiz#FERFELRUI#MADRID#667892641#DesarrolloMadrid#Calle de Fernando | |
Carolina#Cepeda Huerta#CARCEPHUE#MADRID#631533441#DesarrolloMadrid#Calle de Carolina | |
Helena#Lorenzo Alonso#HELLORALO#MALAGA#645645646#AdministracionMalaga#Calle de Helena | |
Pedro#Calleja Suarez#PEDCALSUA#MALAGA#675245346#AdministracionMalaga#Calle de Pedro | |
Sergio#Suarez Pelayo#SERSUAPEL#MALAGA#652543441#DesarrolloMalaga#Calle de Sergio | |
Felipe#Muñoz Blas#FELMUNBLA#MALAGA#652543441#DesarrolloMalaga#Calle de Felipe |