Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / rss-metadata.md
Last active June 18, 2024 16:41
Contenido y paquetes a instalar

Paquetes a instalar y configuraciones

Instalaciones

npm i sanitize-html markdown-it
npm i -D @types/markdown-it @types/sanitize-html

bun i sanitize-html markdown-it
bun i -d @types/markdown-it @types/sanitize-html
@Klerith
Klerith / author.astro
Last active June 15, 2024 15:53
Tarea - Página para mostrar todas las entradas de un autor
---
import MainLayout from '../../layouts/MainLayout.astro';
const { blogPosts, author } = Astro.props;
---
<MainLayout>
<section class="bg-gray-900">
<div class="container px-6 py-10 mx-auto">
<h1 class="text-3xl font-semibold capitalize lg:text-4xl text-white">
html {
@apply bg-gray-900 px-10;
}
body {
@apply mt-10;
}
h1 {
@apply text-3xl text-white my-5;
@Klerith
Klerith / global.css
Created June 10, 2024 20:52
Estilo para la aplicación de Astro
/*
The CSS in this style tag is based off of Bear Blog's default CSS.
https://github.com/HermanMartinus/bearblog/blob/297026a877bc2ab2b3bdfbd6b9f7961c350917dd/templates/styles/blog/default.css
License MIT: https://github.com/HermanMartinus/bearblog/blob/master/LICENSE.md
*/
:root {
--accent: #2337ff;
--accent-dark: #000d8a;
--black: 15, 18, 25;
@Klerith
Klerith / instalaciones-astro.md
Last active June 16, 2024 18:58
Instalaciones necesarias para el curso de Astro

Instalaciones Recomendadas

Astro Logo

Astro: Astro: El framework para sitios web orientados al contenido

@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 / payments.data.ts
Created May 13, 2024 12:29
Generador de data para pruebas
import { v4 as uuidV4 } from "uuid";
import { uniqueNamesGenerator, Config, names } from "unique-names-generator";
const config: Config = {
dictionaries: [names],
};
export type Payment = {
id: string;
amount: number;
@Klerith
Klerith / instalaciones-shadcn.md
Last active June 5, 2024 11:12
Instalaciones recomendadas para el curso de Shadcn/ui