Skip to content

Instantly share code, notes, and snippets.

View posthardcode's full-sized avatar
🎯
Focusing

Bruno Nascimento posthardcode

🎯
Focusing
  • bunch
  • Lisbon, Portugal
View GitHub Profile
@pesterhazy
pesterhazy / building-sync-systems.md
Last active October 25, 2025 03:18
Building an offline realtime sync engine

So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.

Overview articles

@jherax
jherax / arrayFilterFactory.1.ts
Last active September 23, 2025 09:55
Filters an array of objects with multiple match-criteria.
type FilterOperator = 'AND' | 'OR';
type FiltersBy<T> = {
[K in keyof T]?: (value: T[K]) => boolean;
};
/**
* Factory function that creates a specialized function to filter
* arrays, by validating all filters (AND operator),
* or validating just one of the filters (OR operator).
* @param operator Method to validate all filters: AND, OR