Skip to content

Instantly share code, notes, and snippets.

View dandelg88's full-sized avatar
💻
Learning

Dan Delgado dandelg88

💻
Learning
View GitHub Profile
@Klerith
Klerith / chart-utils.ts
Created May 22, 2024 20:15
Utilidades para gráficas con ChartJS
import axios from 'axios';
import colorLib from '@kurkle/color';
interface ChartOptions {
height?: number;
width?: number;
}
export const chartJsToImage = async (
chartConfig: unknown,
@Klerith
Klerith / docker-compose.yml
Created May 18, 2024 15:35
PostgreSQL & PgAdmin
services:
db:
container_name: postgres_database
image: postgres:16.3
volumes:
- ./postgres:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=123456
restart: always
ports:
@Klerith
Klerith / instalaciones-angular-openai.md
Created January 8, 2024 13:15
Instalaciones recomendadas para el curso de OpenAI con Angular y Nest

OpenAI Logo

Instalaciones recomendadas

Curso de OpenAI con Angular y NestJS

Necesarias

@igorbabko
igorbabko / settings.json
Created December 23, 2023 10:24
VS Code Settings
{
"window.zoomLevel": 2,
"workbench.colorTheme": "Aura Dracula Spirit (Soft)",
"workbench.iconTheme": "material-icon-theme",
"material-icon-theme.hidesExplorerArrows": true,
"workbench.tree.renderIndentGuides": "none",
"workbench.sideBar.location": "right",
"workbench.activityBar.visible": false,
"workbench.statusBar.visible": false,
"workbench.editor.showTabs": false,
@Klerith
Klerith / seed-data.ts
Last active February 10, 2025 00:10
Información para poblar la base de datos
import { bcryptAdapter } from '../../config';
export const seedData = {
users: [
{ name: 'Test 1', email: '[email protected]', password: bcryptAdapter.hash( '123456') },
{ name: 'Test 2', email: '[email protected]', password: bcryptAdapter.hash( '123456') },
{ name: 'Test 3', email: '[email protected]', password: bcryptAdapter.hash( '123456') },
@Klerith
Klerith / regular-exp.ts
Created September 9, 2023 16:55
Email Validation
export const regularExps = {
// email
email: /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/,
}
@Klerith
Klerith / .env
Last active March 9, 2025 06:03
.env y docker compose para Postgres
PORT=3000
PUBLIC_PATH=public
POSTGRES_URL=postgresql://postgres:123456@localhost:5432/TODO
POSTGRES_USER=postgres
POSTGRES_DB=TODO
POSTGRES_PORT=5432
POSTGRES_PASSWORD=123456
@Klerith
Klerith / self-certificates.sh
Last active March 22, 2025 14:50
Generar certificados
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt
@Klerith
Klerith / configurar-node-ts.md
Last active May 12, 2025 14:59
Node con TypeScript - TS-Node-dev simplificado

Node con TypeScript - TS-Node-dev (preferido)

  1. Instalar TypeScript y demás dependencias
npm i -D typescript @types/node ts-node-dev rimraf
  1. Inicializar el archivo de configuración de TypeScript ( Se puede configurar al gusto)
npx tsc --init --outDir dist/ --rootDir src