Skip to content

Instantly share code, notes, and snippets.

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

Sebastian Calderon jscalderon65

🏠
Working from home
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
html {
background: #0e1117;
height: 100%;
position: relative;

Copia de Seguridad y Restauración de la Base de Datos en Mongo Atlas

Paso 1

Realizar una Copia de Seguridad de tu Base de Datos Local Utiliza la herramienta mongodump en tu sistema local para hacer una copia de seguridad de tu base de datos local de MongoDB. Ejemplo:

mongodump --db nombre_de_tu_base_de_datos --out /ruta/para/la/copia_de_seguridad
@jscalderon65
jscalderon65 / WhatIsACookie.js
Created May 2, 2023 19:56
Therefore, cookies are small strings that contain key-value pairs of information sent from the webserver to the browser to get information about the user. The browser will then save them locally. This way, subsequent requests can be made to the server to immediately update user content on the website depending on the previous requests that a use…
app.get('/getcookie', (req, res) => {
//show the saved cookies
console.log(req.cookies)
res.send(req.cookies);
});
app.get('/deletecookie', (req, res) => {
//delete all cookies
res.clearCookie()
.container {
flex: 1;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
grid-auto-rows: minmax(250px, 1fr);
grid-gap: 20px;
}
.card {
align-self: center;
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@jscalderon65
jscalderon65 / RouteLoader.js
Last active April 26, 2023 02:13
Express routing auto loader
const debug = require('debug')('backend:route-auto-loader')
const fs = require('fs')
const path = require('path')
const ROUTES_PATH = 'src/Routes'
function slash(text) {
return text.replace(/\\/g, '/')
}
@jscalderon65
jscalderon65 / MasonryGallery.html
Last active April 26, 2023 02:13
A pure css grid masonry gallery.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Masonry Gallery</title>
</head>
<body>
<div class="container">
@jscalderon65
jscalderon65 / ShowWifiPassword.bat
Last active April 13, 2022 15:12
ShowWifiPassword
netsh wlan show profile
netsh wlan show profile (WIFI-NAME) key=clear
@jscalderon65
jscalderon65 / KillProcess.bat
Created April 11, 2022 21:39
Kill process in windows port
netstat -aon | findstr : (portNumber)
taskkill /pid (pidNumber) /F
const fs = require('fs').promises
const writeFile = async()=>{
await fs.writeFile('filename.txt', 'test');
}
const readFile = async()=>{
const file = await fs.readFile('filename.txt', 'utf8');
return file
}