Skip to content

Instantly share code, notes, and snippets.

View arellano-gustavo's full-sized avatar
💭
I am just happy

Gustavo Adolfo Arellano Sandoval arellano-gustavo

💭
I am just happy
View GitHub Profile
@arellano-gustavo
arellano-gustavo / LoginView.vue
Created December 6, 2023 15:28
archivo de Vue para clase
<template>
<div>
version: '3'
services:
mariadb:
image: 'mariadb'
restart: unless-stopped
environment:
- MARIADB_USER=chavelo
- MARIADB_DATABASE=no_importa
- MARIADB_PASSWORD=secreto
version: '3'
services:
db:
image: mariadb:10.3.9
volumes:
- data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=secret
- MYSQL_DATABASE=wordpress
@arellano-gustavo
arellano-gustavo / README.md
Last active October 26, 2022 02:48
Prueba sencilla de microk8s con una imagen de Spark

Instrucciones

1  mkdir project
2  cd project
3  nano app.yaml
4  nano store-ssl-cert.sh
5  nano create-secret.sh
6  nano server.key
7  nano server.crt
8 chmod 700 *.sh
@arellano-gustavo
arellano-gustavo / app.yaml
Created October 25, 2022 19:02
yaml file for us to deploy a simple springboot app (with 3 replicas) in microk8s and nginx as a reverse proxy (ingress balancer)
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: demo-microk8s-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
tls:
- hosts:
- access.qbits.mx
@arellano-gustavo
arellano-gustavo / redirect-if-mobile.conf
Last active October 18, 2022 14:09
Nginx configuration for redirect to a mobile version if mobile detected
#-----------------------------
# alvinalexander.com (desktop)
#-----------------------------
server {
server_name alvinalexander.com;
listen 80;
#----- redirect to mobile check (starts) -----#
set $mobile_rewrite do_not_perform;
@arellano-gustavo
arellano-gustavo / balanceador.conf
Created January 24, 2022 14:26
Archivo de configuración de nginx que uso para balancear un servicio
upstream balanceador {
server srv02:9001;
server srv02:9002;
server srv02:9003;
}
server {
server_name balanceador.qbits.mx;
location / {
@arellano-gustavo
arellano-gustavo / docker-compose.yml
Created December 30, 2021 03:31
Archivo docker-compose para levantar un wordpress
version: '3.7'
services:
db:
image: mysql:8.0.19
command: '--default-authentication-plugin=mysql_native_password'
volumes:
- /this/is/the/path/wordpress/data:/var/lib/mysql
restart: always
environment:
- MYSQL_ROOT_PASSWORD=somewordpress
@arellano-gustavo
arellano-gustavo / ws.html
Last active December 13, 2021 05:48
Un cliente del websocket de Binance
<!DOCTYPE html>
<html>
<head>
<title>Prueba de un cliente de un websocket</title>
<script type="text/javascript">
var webSocket = new WebSocket('wss://fstream.binance.com/ws/btcusdt@trade');
@arellano-gustavo
arellano-gustavo / NodeTest.java
Created May 23, 2021 17:01
Ejercicio de nodos en Java
package mx.com.ultrasist.ci.generator;
// Curly brace Enemy ...
// https://javarevisited.blogspot.com/2017/03/how-to-reverse-linked-list-in-java-using-iteration-and-recursion.html
public class SinglyLinkedList<T> {
private Node<T> head;
/**
* Imprime esta lista ligada con un formato
* específico delimitado por símbolos '--->'