Skip to content

Instantly share code, notes, and snippets.

View MahatmaFatalError's full-sized avatar

Mahatma_Fatal_Error MahatmaFatalError

View GitHub Profile
@Tostino
Tostino / refresh_where.md
Last active April 20, 2026 21:10
Making Postgres materialized view refreshes O(delta) instead of O(total)

Making Postgres materialized view refreshes O(delta) instead of O(total)

Many developers assume PostgreSQL materialized views handle incremental updates out of the box. They do not. If you have a materialized view with millions of rows and a single underlying record changes, both native refresh options process the entire dataset.

Because of this limitation, anyone needing immediate maintenance or working with large datasets must abandon materialized views entirely. The standard workaround is to manually maintain a standard table using custom database triggers or application logic.

I've been working on a patch to fix this. It adds an optional WHERE clause to the REFRESH MATERIALIZED VIEW command, letting you scope a refresh to exactly the rows that changed. The patch is currently under review on the pgsql-hackers mailing list.

This approach requires two things. First, the materialized view must have a unique index (the same requirement as REFRESH MATERIALIZED VIEW ... CONCURRENTLY). Second, the

@odrotbohm
odrotbohm / moduliths-vs-microservices.adoc
Last active June 22, 2025 10:09
Modulith & Microservice – A trade-off comparison

Modulith VS. Microservices

This document contains a tabular comparison of the Modulithic and Microservice Architecture approach under certain aspects. Many of them can be achieved or influenced in both styles, but to different degrees and using different means. No claims of exhaustiveness.

@spinscale
spinscale / autobahn-api-to-es.cr
Last active February 4, 2025 15:16
Visualizing the unofficial autobahn API into the Elastic Stack
# autobahn-api-to-es
#
# Indexes autobahn API metadata into Elasticsearch to use it with Kibana Maps
#
# Original API description https://gist.github.com/LilithWittmann/06bd153317b635e7b622651f5cfd95ea
#
#
# MIT License
#
# Copyright (c) [2021]
@LilithWittmann
LilithWittmann / autobahn.md
Last active January 14, 2025 12:25
autobahn.md
@petrbouda
petrbouda / memory-limit-request-jvm.md
Last active April 30, 2026 21:03
Memory LIMIT and REQUEST in Containers and JVM

Memory LIMIT and REQUEST in Containers and JVM

  • Do you run a JVM inside a container on Kubernetes (or maybe OpenShift)?
  • Do you struggle with REQUEST and LIMIT parameters?
  • Do you know the impact of those parameters on your JVM?
  • Have you met OOM Killer?

Hope you will find answers to these questions in this example-based article.

How to set up JVM Heap size in a Container

@sorin-costea
sorin-costea / index.html
Created June 21, 2020 18:05
Vue.js if you're not a frontend developer
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Vue test</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
</head>
@mosamman
mosamman / maven-publish-check.gradle
Last active December 24, 2024 14:59
A Simple gradle task to check if the artifact version exists before publishing to maven server.
publish.dependsOn lookForArtifacts
task lookForArtifacts {
group "upload"
doLast {
def pomFileName = "${ARTIFACT_ID}-${ARTIFACT_VERSION}.pom"
def artifactPath = "${ARTIFACT_GROUP.replace(".", "/")}/${ARTIFACT_ID}/${ARTIFACT_VERSION}/${pomFileName}"
def repositoryUrl = "$MAVEN_SERVER/${artifactPath}"
@noamtamim
noamtamim / README.md
Last active April 24, 2026 05:49
Markdown with PlantUML

How to use PlantUML with Markdown

PlantUML is a really awesome way to create diagrams by writing code instead of drawing and dragging visual elements. Markdown is a really nice documentation tool.

Here's how I combine the two, to create docs with embedded diagrams.

Step 0: Setup

Get the command-line PlantUML from the download page or your relevant package manager.

@laggardkernel
laggardkernel / startup-time-of-zsh.md
Last active January 29, 2026 17:37
Comparison of ZSH frameworks and plugin managers

Comparison of ZSH frameworks and plugin managers

Changelog

  • update 1: add a FAQ section
  • update 2: benchmark chart and feature comparison table
  • update 3:
    • improve the table with missing features for antigen
    • new zplg times result

TLDR