ale's Avatar

ale

@aberigle.com

Desarrollador. ๐Ÿ“ Barakaldo ๐Ÿ”— aberigle.com

81
Followers
108
Following
368
Posts
08.09.2023
Joined
Posts Following

Latest posts by ale @aberigle.com

Preview
PWA Encryption and Auto Sign-in The one where paranoia gets the better of me.

๐Ÿค“

13.03.2026 08:10 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Post image
11.03.2026 08:40 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

ยฟalguien conoce un plugin esbuild para compilar PWAs?

Estoy intentando hacer uno que importe todo desde el html pero me he atascado

#help #esbuild #bun #pwa

09.03.2026 09:19 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

tengo autรฉnticos hackers entrando a miweb

26.02.2026 12:24 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Post image

#TIL que el "paรญs" T1 es cualquier nodo de salida de la red TOR

26.02.2026 12:23 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
diferentes urls de envรญo de webpush

diferentes urls de envรญo de webpush

estoy trasteando con webpush... el envรญo de notis depende de los proveedores de los navegadores, cada uno te genera su propio endpoint.

ยฟAlguien sabe si esto tiene algรบn lรญmite?

#webpush #webdev

22.02.2026 15:44 ๐Ÿ‘ 1 ๐Ÿ” 1 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
diferentes urls de envรญo de webpush

diferentes urls de envรญo de webpush

estoy trasteando con webpush... el envรญo de notis depende de los proveedores de los navegadores, cada uno te genera su propio endpoint.

ยฟAlguien sabe si esto tiene algรบn lรญmite?

#webpush #webdev

22.02.2026 15:44 ๐Ÿ‘ 1 ๐Ÿ” 1 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Infantino (fife)

20.02.2026 07:53 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Preview
a man in a costume is holding a flag and a pretzel in a living room . ALT: a man in a costume is holding a flag and a pretzel in a living room .

#funWithTypes

18.02.2026 16:17 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
export function renameFields<
  Origin extends { [K: string]: any },
  const Mapping extends { [K in keyof Origin]: string }
>(
  origin: Origin,
  mapping: Mapping
) {

  const result = Object
    .entries(mapping)
    .map(
      ([oldKey, newKey]) => [newKey, origin[oldKey]]
    )

  return Object.fromEntries(result) as {
    [K in keyof Mapping as Mapping[K]]: Origin[K & keyof Origin]
  }
}

export function renameFields< Origin extends { [K: string]: any }, const Mapping extends { [K in keyof Origin]: string } >( origin: Origin, mapping: Mapping ) { const result = Object .entries(mapping) .map( ([oldKey, newKey]) => [newKey, origin[oldKey]] ) return Object.fromEntries(result) as { [K in keyof Mapping as Mapping[K]]: Origin[K & keyof Origin] } }

no se si alguien necesita esto, pero una funciรณn para renombrar campos de un objeto en typescript que es typesafe

18.02.2026 16:13 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Contraproducente para ellos jejejeje

17.02.2026 07:32 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Los 3 patitos!

Zorionak!

16.02.2026 13:57 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Post image

Esa peรฑa que usa Edge en iOS??

04.02.2026 10:23 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Claro que con esta soluciรณn, es necesario usar un entorno que tenga libxml. But

Dockerfile
FROM oven/bun AS base

RUN apt-get update && apt-get install -y libxml2-utils

29.01.2026 08:27 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Post image

y los errores tienen esta pinta:

29.01.2026 08:24 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

efectivamente, para simular el stdin en Bun.$ (shell) hay que envolverlo en un Response (?)

Supongo que algรบn sentido tendrรก, pero hasta que he dado con ello he perdido un rato

29.01.2026 08:23 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Post image

pos creo que ya estarรญa

#bun #xsd #xml #libxml

29.01.2026 08:21 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Post image

Sometimes a man just wants to poder validar un xml contra el xsd en typescript

28.01.2026 15:00 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Post image

ยฟEs cosa mรญa o estas visitas son todas la misma persona?

27.01.2026 07:50 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Post image

porque se mete gente de singapur a mi web en espaรฑol ๐Ÿ˜… ๐Ÿฅฒ

19.01.2026 10:45 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
import { Type } from '@sinclair/typebox';
import { ObjectId } from 'mongoose';

const PrefixedIdPattern = (prefix: string) => `^${prefix}_[a-z0-9]+$`;

export const PrefixedIdType = (prefix: string) =>
  Type.String({
    pattern: PrefixedIdPattern(prefix),
    examples: [`${prefix}_35qdq9mgpsa7alngckj`],
    default: `${prefix}_000000000000000000000000`
  })

export const PrefixedId = (prefix: string) => Type.Transform(PrefixedIdType(prefix))
  .Decode(value => unmaskId(value))
  .Encode(value => maskId(value, prefix))

export function maskId(objectId: ObjectId | string, prefix: string) {
  const hex = objectId.toString();

  const base36 = BigInt(`0x${hex}`).toString(36);

  return `${prefix}_${base36}`;
}

export function unmaskId(masked: string) {
  const [, value] = masked.split('_');

  const chars = "0123456789abcdefghijklmnopqrstuvwxyz";
  let bigIntValue = BigInt(0);
  for (const char of value.toLowerCase()) {
    bigIntValue = bigIntValue * BigInt(36) + BigInt(chars.indexOf(char));
  }

  let hex = bigIntValue.toString(16);
  return hex.padStart(24, '0');
}

import { Type } from '@sinclair/typebox'; import { ObjectId } from 'mongoose'; const PrefixedIdPattern = (prefix: string) => `^${prefix}_[a-z0-9]+$`; export const PrefixedIdType = (prefix: string) => Type.String({ pattern: PrefixedIdPattern(prefix), examples: [`${prefix}_35qdq9mgpsa7alngckj`], default: `${prefix}_000000000000000000000000` }) export const PrefixedId = (prefix: string) => Type.Transform(PrefixedIdType(prefix)) .Decode(value => unmaskId(value)) .Encode(value => maskId(value, prefix)) export function maskId(objectId: ObjectId | string, prefix: string) { const hex = objectId.toString(); const base36 = BigInt(`0x${hex}`).toString(36); return `${prefix}_${base36}`; } export function unmaskId(masked: string) { const [, value] = masked.split('_'); const chars = "0123456789abcdefghijklmnopqrstuvwxyz"; let bigIntValue = BigInt(0); for (const char of value.toLowerCase()) { bigIntValue = bigIntValue * BigInt(36) + BigInt(chars.indexOf(char)); } let hex = bigIntValue.toString(16); return hex.padStart(24, '0'); }

He aรฑadido un nuevo tipo en typebooxe que te permiter enmascarar un ObjectId de mongo y darle el formato de los ids de stripe. Tipo prj_abc123.

Asรญ se puede enmascarar el id usando Value.Encode/Value.Decode en APIs pรบblicas de manera bastante transparente.

Documentaciรณn comming soon.

24.12.2025 10:41 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Preview
Christmas Jazz

animo con esas playlists

open.spotify.com/playlist/37i...

24.12.2025 10:36 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Preview
Vue.js Vue.js - The Progressive JavaScript Framework

ยฟacabo de descubrir Teleport en vue y me ha solucionado la vida? si

vuejs.org/guide/built-...

24.12.2025 10:31 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Un momento... ยฟยฟSomos bits???

24.12.2025 07:59 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

se agradece

03.12.2025 11:09 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Anthropic ha comprado @bun.sh ๐Ÿฅฒ

03.12.2025 08:55 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

que manera de poner todos los huevos en la misma cesta de Meta cada vez que le pasa algo por delante (y quรฉ capacidad para hacerlo)

02.12.2025 16:24 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Preview
โœ… รšltimo tipo de cambio oficial euro a dรณlares USA | EUR /ย USD Calcula el cambio de divisa de euros a dรณlares USA (EUR/USD) con el tipo de cambio oficial del Banco de Espaรฑa. El dato publicado mรกs reciente para tus operaciones financieras.

Probando pruebas

divisasboe.es/tipo-cambio-...

28.11.2025 11:46 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

cuรกnto ano-shaming hoy

27.11.2025 11:20 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

A mรญ me gusta la del zorro pero tendrรญa que reverla ๐Ÿ˜ถ

27.11.2025 08:20 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0