Skip to content

Instantly share code, notes, and snippets.

View mareksuscak's full-sized avatar
🏠
Working from home

Marek Suscak mareksuscak

🏠
Working from home
View GitHub Profile
@pesterhazy
pesterhazy / building-sync-systems.md
Last active May 10, 2024 22:12
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

@joelonsql
joelonsql / PostgreSQL-EXTENSIONs.md
Last active May 12, 2024 09:42
1000+ PostgreSQL EXTENSIONs

🗺🐘 1000+ PostgreSQL EXTENSIONs

This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.

⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.

@mohamedhafez
mohamedhafez / createPushPackage.php
Last active March 21, 2022 16:24
createPushPackage.php
<?php
// This script creates a valid push package.
// This script assumes that the website.json file and iconset already exist.
// This script creates a manifest and signature, zips the folder, and returns the push package.
// Use this script as an example to generate a push package dynamically.
$package_version = 2; // Change this to the desired push package version.
@fabiolimace
fabiolimace / UUIDv6.sql
Last active May 12, 2024 03:47
Functions for generating UUIDv6 and UUIDv7 on PostgreSQL
/*
* MIT License
*
* Copyright (c) 2023-2024 Fabio Lima
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@justanotherdot
justanotherdot / Dockerfile.bite_sized_networking
Last active May 20, 2022 08:56
A Dockerfile with (almost) all the tools mentioned in Bite Size Networking by Julia Evans
# N.B. The only tool missing here that is mentioned in the document is `zenmap`
# purely because this image is intended to be run via a CLI and `zenmap` is a GUI
# to `nmap` i.e. one can play around with the tools by running:
#
# $ docker build --name bite_size_networking:latest .
# $ docker run --rm -d --name bsn_test bite_size_networking:latest
# $ docker exec -it bsn_test bash
#
# Alternatively, one can change the `ENTRYPOINT` to `["bash"]` and run:
#
CREATE EXTENSION IF NOT EXISTS pgcrypto;
-- Based roughly on: https://github.com/oklog/ulid
CREATE FUNCTION generate_ulid()
RETURNS TEXT
AS $$
DECLARE
-- Crockford's Base32
encoding BYTEA = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';
timestamp BYTEA = E'\\000\\000\\000\\000\\000\\000';
@bvaughn
bvaughn / index.md
Last active May 4, 2024 11:25
How to use profiling in production mode for react-dom

React recently introduced an experimental profiler API. This page gives instructions on how to use this API in a production release of your app.

Table of Contents

Profiling in production

React DOM automatically supports profiling in development mode for v16.5+, but since profiling adds some small additional overhead it is opt-in for production mode. This gist explains how to opt-in.

@bvaughn
bvaughn / index.md
Last active April 3, 2024 07:41
Interaction tracing with React

This API was removed in React 17


Interaction tracing with React

React recently introduced an experimental profiler API. After discussing this API with several teams at Facebook, one common piece of feedback was that the performance information would be more useful if it could be associated with the events that caused the application to render (e.g. button click, XHR response). Tracing these events (or "interactions") would enable more powerful tooling to be built around the timing information, capable of answering questions like "What caused this really slow commit?" or "How long does it typically take for this interaction to update the DOM?".

With version 16.4.3, React added experimental support for this tracing by way of a new NPM package, scheduler. However the public API for this package is not yet finalized and will likely change with upcoming minor releases, so it should be used with caution.

@mousetree
mousetree / config.yml
Created July 12, 2018 09:57
Multi environment CircleCI build
version: 2
jobs:
test:
docker:
- image: circleci/node:10
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API