Skip to content

Instantly share code, notes, and snippets.

View alexrold's full-sized avatar

Ronald Betancourt alexrold

View GitHub Profile
{
// Coloque su configuración en este archivo para sobrescribir la configuración predeterminada.
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "Spotify Theme",
"workbench.sideBar.location": "right",
"workbench.colorCustomizations": {
"editorLineNumber.foreground": "#00ff00"
},
// ARCHIVO
@alexrold
alexrold / Dockerfile
Created January 10, 2023 18:15 — forked from Klerith/Dockerfile
Preparar imagen de Docker - Node App
# Install dependencies only when needed
FROM node:18-alpine3.15 AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
# Build the app with cache dependencies
FROM node:18-alpine3.15 AS builder
@alexrold
alexrold / hex-color.js
Created November 15, 2022 18:25 — forked from Klerith/hex-color.js
Color HEX aleatorio
const color = "#xxxxxx".replace(/x/g, y=>(Math.random()*16|0).toString(16));
@alexrold
alexrold / git-alias.md
Created June 20, 2022 18:34 — forked from Klerith/git-alias.md
Useful Git Alias

Log

git config --global alias.lg "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"

Status

git config --global alias.s status --short

Alternativa útil de status

git config --global alias.s status -sb

@alexrold
alexrold / validations.ts
Created April 26, 2022 19:47 — forked from Klerith/validations.ts
Validar email
export const isValidEmail = (email: string): boolean => {
const match = String(email)
.toLowerCase()
.match(
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
);
@alexrold
alexrold / MongoID-regexp.ts
Created March 31, 2022 19:31 — forked from Klerith/MongoID-regexp.ts
MongoID - RegExp
const checkMongoIDRegExp = new RegExp("^[0-9a-fA-F]{24}$");
@alexrold
alexrold / recomendada.Dockerfile
Created March 15, 2022 17:38 — forked from Klerith/recomendada.Dockerfile
NextJS - Dockerfile - Configuración simple y recomendada
# Fuente: https://github.com/vercel/next.js/blob/canary/examples/with-docker/README.md
# Install dependencies only when needed
FROM node:16-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
@alexrold
alexrold / calendar-messages-es.js
Created February 24, 2022 16:13 — forked from Klerith/calendar-messages-es.js
Big-Calendar - mensajes en español
export const messages = {
allDay: 'Todo el día',
previous: '<',
next: '>',
today: 'Hoy',
month: 'Mes',
week: 'Semana',
day: 'Día',
agenda: 'Agenda',
date: 'Fecha',
@alexrold
alexrold / google-btn.html
Created February 7, 2022 13:36 — forked from Klerith/google-btn.html
Botón de Google
<div
className="google-btn"
>
<div className="google-icon-wrapper">
<img className="google-icon" src="https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg" alt="google button" />
</div>
<p className="btn-text">
<b>Sign in with google</b>
</p>
</div>