Skip to content

Instantly share code, notes, and snippets.

View jeferandom's full-sized avatar
🏠
Working from home

Jef Mancera jeferandom

🏠
Working from home
View GitHub Profile
@jeferandom
jeferandom / server.js
Last active May 19, 2022 16:16
Config Swagger Express with yaml files.
const swaggerJsdoc = require("swagger-jsdoc");
const swaggerUI = require('swagger-ui-express');
const options = {
definition: {
openapi: "3.0.0",
info: {
"title": "Server Importacion",
"version": "1.0.0"
},
@bradtraversy
bradtraversy / docker_wordpress.md
Last active September 16, 2024 05:17
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@donpandix
donpandix / valida_rut.js
Last active September 5, 2024 17:57
Valida RUT chileno con JavaScript
var Fn = {
// Valida el rut con su cadena completa "XXXXXXXX-X"
validaRut : function (rutCompleto) {
if (!/^[0-9]+[-|‐]{1}[0-9kK]{1}$/.test( rutCompleto ))
return false;
var tmp = rutCompleto.split('-');
var digv = tmp[1];
var rut = tmp[0];
if ( digv == 'K' ) digv = 'k' ;
return (Fn.dv(rut) == digv );
@gorangajic
gorangajic / es6-spread-immutable-cheatsheet.md
Last active April 11, 2024 08:32
es6 spread immutable cheatsheet

update object

var state = {
    id: 1,
    points: 100,
    name: "Goran"
};

var newState = {
@jojobyte
jojobyte / ContextCmder-Disable.reg
Last active May 13, 2024 12:38
Cmder Context (Right-Click) Menu for Windows 7, 8, 10 & 11
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder]
@soheilhy
soheilhy / nginxproxy.md
Last active September 19, 2024 06:16
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers