Skip to content

Instantly share code, notes, and snippets.

View viggy28's full-sized avatar

viggy28

View GitHub Profile

Improvements/Enhancements for PGPM:

Enhanced Metadata:

  • Move away from PGXN type META.json metadat form or stick to it? We could think of a way to impove metadata colletion for an extension. (but sticking to a widely accepted standard like PGXN or considering improvements aligns with best practices)

Automatic Dependency Installation:(kinda like homebrew)

-(Provide users with options for manual intervention in case they want more control over dependencies)

WITH
constants AS (
SELECT
current_setting('server_version') AS version,
current_setting('block_size')::int AS block_size,
current_setting('autovacuum_vacuum_cost_delay') AS cost_delay,
1000 / extract(milliseconds FROM current_setting('autovacuum_vacuum_cost_delay')::interval) AS delays_per_sec,
COALESCE(NULLIF(current_setting('autovacuum_vacuum_cost_limit')::int, -1), current_setting('vacuum_cost_limit')::int) AS cost_limit,
current_setting('vacuum_cost_page_hit')::int AS cost_hit,
current_setting('vacuum_cost_page_miss')::int AS cost_miss,
@alexedwards
alexedwards / _tree
Created October 27, 2020 07:52
Dependency injection via closure (handlers in multiple packages)
.
├── go.mod
├── handlers
│ ├── books
│ │ └── books.go
│ └── env.go
├── main.go
└── models
└── models.go
@datlife
datlife / README.md
Last active March 25, 2024 17:10
Build LLVM / Clang on MacOS

Build LLVM / Clang on MacOS

Problem

Built-in Clang / LLVM shipped by Xcode does not support Leak Santizer (-fsantize=leak) feature. For example, this code has memory leak:

// File: main.c

#include <stdlib.h>
@peterhellberg
peterhellberg / minimal-server.go
Created May 16, 2018 19:16
A pretty minimal HTTP server example in Go
package main
import (
"io/ioutil"
"log"
"net/http"
"os"
"time"
)
@CodingDoug
CodingDoug / README.md
Last active August 3, 2023 16:41
Copying Data from a Google Sheet into Firebase Realtime Database in real time via Apps Script
@kevin-smets
kevin-smets / 1_kubernetes_on_macOS.md
Last active January 6, 2024 22:04
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@leonardofed
leonardofed / README.md
Last active April 19, 2024 09:00
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


package main
import (
"io/ioutil"
"log"
"strings"
)
func main() {
input, err := ioutil.ReadFile("myfile")