Skip to content

Instantly share code, notes, and snippets.

View morjuax's full-sized avatar
🎯
Focusing

Juan morjuax

🎯
Focusing
View GitHub Profile
git stash: guarda los cambios temporalmente en memoria cuando no quieres hacer un commit aun
git stash save “mensaje”: guarda un stach con mensaje
git stash list: muestra la lista de cambios temporales
git stash pop: trae de vuelta los cambios que teníamos guardados en el ultimo stash
git stash apply stash@{n}: trae el stash que necesites con indicar su número dentro de las llaves
git stash drop: borra el ultimo stash
git stash clear: borra todos los stash
@morjuax
morjuax / validateDateRegex.js
Created July 4, 2022 17:42
Validate date with regex
const date_regex = /^(0[1-9]|1\d|2\d|3[01])\/(0[1-9]|1[0-2])\/(19|20)\d{2}$/; // dd/mm/yyyy
const date_regex2 = /^(0[1-9]|1[0-2])\/(0[1-9]|1\d|2\d|3[01])\/(19|20)\d{2}$/; // mm/dd/yyyy
const testDate = '13/06/2022';
date_regex.test('01/12/2022')
date_regex2.test('12/30/2022')
@morjuax
morjuax / @inputWithSet
Last active July 30, 2021 17:46
Input angular with set
@Input()
set parameterInput({ prop1, prop2 }: Interface) {
this.prop1 = prop1;
this.prop2 = prop2;
}
@morjuax
morjuax / gist:116cfef39c7dc15a5636251a0e8155bd
Created December 22, 2020 19:14
Design responsive template email
https://webdesign.tutsplus.com/es/articles/creating-a-simple-responsive-html-email--webdesign-12978
@morjuax
morjuax / breakPointResponsive.txt
Created December 21, 2020 15:09
Break Point Responsive css
/* RESPONSIVE
========================================================================= */
/* Tablets en horizonal y escritorios normales
------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1199px) {
}
/* Móviles en horizontal o tablets en vertical
------------------------------------------------------------------------- */
@morjuax
morjuax / gist:202b8fbad0d0ab627006ee5abd0f42e2
Last active December 10, 2020 14:29
Rebase Interactivo, para unir commits en 1 solo
En algunos casos cuando nos toca desplegar master y no queremos subir todos commits de tu ramma, nos puede tocar unir commits.
El *git rebase* puede ayudar, Ojo: Se pierde el historial de commits, lo recomendable es hacer esto local y no commits pusheados
Ejemplo tienes 4 commits
e5c49d9 (HEAD -> cambio3) [ADD]
f584ba1 cam3
eed9d9a [ADD] cam333.txt
c427b35 [ADD] cambio 1
@morjuax
morjuax / install_docker.md
Created March 15, 2020 21:14
Instalar docker en SO mas importantes

Instalar Docker

Config file /lib/systemd/system/docker.service

CentOS


Utilidades

sudo yum install -y yum-utils device-mapper-persistent-data lvm2

@morjuax
morjuax / vsCode.md
Last active February 5, 2020 13:48
Configure Env VS code
  1. "workbench.editor.enablePreview": false

Extensions:

  1. Material icons
  2. Prettier (format)
@morjuax
morjuax / install_yarn_ubuntu.md
Last active February 3, 2020 17:42
Install yarn ubuntu
@morjuax
morjuax / entryPointServerJs.md
Last active January 11, 2020 14:46
Server NodeJs

ES6

import express from 'express';

const app = express(); const port = process.env.PORT || 3000;

app.listen(port, () => console.log('Server on port ', port));