This file contains hidden or 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
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
ServerName <<MiIP>> | |
ProxyPreserveHost On | |
ProxyRequests On | |
This file contains hidden or 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/sh | |
FILE=/root/.ssh/id_rsa_nuevo.pub | |
if [ ! -f "$FILE" ]; then | |
yes yes | ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa_nuevo | |
cp $FILE /home/ucjc/ | |
fi | |
if [ ! -f /home/ucjc/sshd_config ]; then | |
cat /etc/ssh/sshd_config > /home/ucjc/sshd_config | |
chmod 777 /home/ucjc/sshd_config | |
fi |
This file contains hidden or 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> | |
#include <string.h> | |
#include <stdlib.h> | |
typedef struct { | |
char clave[4]; | |
char nombre[100]; | |
} Carrera; | |
typedef struct { |
This file contains hidden or 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
Javalin app = getInstanciaJavalin(); | |
app.routes(()->{ | |
path("/path/", () -> { | |
before(ctx -> { | |
System.out.println("Entrando a la ruta path..."); | |
}); | |
get("/", ctx -> { | |
ctx.result("Ruta path /"); | |
}); |
This file contains hidden or 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
listen aplicacion_web | |
bind *:80 | |
mode http | |
stats enable | |
stats uri /stats | |
stats realm HAProxy\ Statistics | |
stats auth cda:cda | |
balance roundrobin | |
cookie JSESSIONID prefix nocache | |
server app-01 localhost:7000 check |
This file contains hidden or 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
listen aplicacion_web | |
bind *:80 | |
mode http | |
stats enable | |
stats uri /stats | |
stats realm HAProxy\ Statistics | |
stats auth cda:cda | |
balance roundrobin | |
cookie SERVERID insert indirect nocache | |
server app-01 localhost:7000 check cookie s1 |
This file contains hidden or 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
listen aplicacion_web | |
bind *:80 | |
mode http | |
stats enable | |
stats uri /stats | |
stats realm HAProxy\ Statistics | |
stats auth cda:cda | |
balance roundrobin | |
server app-01 localhost:7000 check | |
server app-02 localhost:7001 check |
This file contains hidden or 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
docker run --name micro-mysql-interno -v ~/data-mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=12345678 -e MYSQL_DATABASE=app --network app_basedatos -d -p 33007:3306 mysql:5.7.26 |
This file contains hidden or 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
package edu.pucmm.hlr; | |
import kong.unirest.HttpResponse; | |
import kong.unirest.JsonNode; | |
import kong.unirest.Unirest; | |
import org.json.JSONObject; | |
public class Main { |
This file contains hidden or 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
public static void main(String[] args) { | |
System.out.println("Hola Mundo Rest Cliente :-D"); | |
HttpResponse<JsonNode> response = Unirest.get("http://localhost:4567/rest/estudiantes/") | |
.header("accept", "application/json") | |
.queryString("apiKey", "123") | |
.asJson(); | |
// | |
System.out.println("Codigo respuesta del HTTP: "+response.getStatus()); |
NewerOlder