Skip to content

Instantly share code, notes, and snippets.

View MacoChave's full-sized avatar
👨‍💻
Learning about Api REST

Marco Chávez MacoChave

👨‍💻
Learning about Api REST
View GitHub Profile
@MacoChave
MacoChave / Guatemala.json
Created November 15, 2023 16:04 — forked from Carlosvva/Guatemala.json
Objeto Json Departamentos y Municipios de Guatemala
[
{
"title" : "Alta Verapaz",
"mun" : [
"Chahal",
"Chisec",
"Cobán",
"Fray Bartolomé de las Casas",
"Lanquín",
"Panzós",

Contenedores de base de datos en Docker

MySQL

docker pull mysql:latest
docker run --name mysql -d --restart always -e MYSQL_USER=dba -e MYSQL_PASSWORD=dba -e MYSQL_ROOT_PASSWORD=root -p 33060:3306 -v $(pwd)/mysql:/var/lib/mysql mysql:latest
@MacoChave
MacoChave / changeShell.txt
Created July 18, 2022 18:14
Cambiar Shell Linux
# MOSTRAR SHELLS INSTALADOS
cat /etc/shells
# MOSTRAR SHELL ACTUAL
ps -p $$
# CAMBIAR SHELL POR DEFECTO
chsh -s /bin/zsh
# REINICIAR SESION EN SHELL
@MacoChave
MacoChave / HelloApplication.java
Created June 7, 2022 20:07
Editor con JavaFX
package com.example.compi;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;
import java.io.IOException;
public class HelloApplication extends Application {
@MacoChave
MacoChave / EditorApp.java
Created June 7, 2022 17:43
Editor con Java Swing
package GUI;
import javax.swing.*;
import java.awt.*;
public class EditorApp extends JFrame {
Panel panel;
public EditorApp() {
super("Compi Editor");
@MacoChave
MacoChave / Linux.md
Created March 2, 2022 05:40
Productividad Windows y LInux

Comandos Linux

Recuperar control del equipo congelado

ALT + ImprPrint + R + E + I + S + U + B

Envía la señal de finalización inmediata (SIGKILL) a todos los procesos activos, incluso el init

ALT + ImprPrint + L

Docker

Imagenes

Contenedores

Mostrar los contenedores corriendo

docker ps

const stripe = require('stripe')('STRIPE_KEY');
exports.handler = async function(req,ctx,callback) {
const stripeToken = req.stripeToken
const cantidad = req.cantidad
const descripcion = req.descripcion
const cantidadInDollar = Math.round(cantidad)
const chargeObject = await stripe.charges.create({
amount: cantidadInDollar,
@MacoChave
MacoChave / conf_hc05.ini
Created October 6, 2021 21:53
Configuración de Módulo Bluetooth Arduino
const int LED = 13;
const int BTPWR = 12;
char nombreBT[11] = "HC-05";
char pin[5] = "1234";
/*
* VELOCIDAD
* 1: 1200
* 2: 2400
* 3: 4800