Skip to content

Instantly share code, notes, and snippets.

@Roenbaeck
Roenbaeck / sp_Markdown.sql
Last active May 30, 2025 14:39
This is a stored procedure for SQL Server that formats the output of an SQL query as Markdown.
USE master;
GO
/*
2025-04-14 Lars Rönnbäck CREATED
2025-04-15 Lars Rönnbäck Renamed to dbo.sp_Markdown.
Uses FOR XML AUTO and REPLACE to handle spaces in column names.
2025-05-26 Lars Rönnbäck Handle NULL values.
Detection of last element through local-name().
@aashari
aashari / 00 - Cursor AI Prompting Rules.md
Last active July 6, 2025 06:50
Cursor AI Prompting Rules - This gist provides structured prompting rules for optimizing Cursor AI interactions. It includes three key files to streamline AI behavior for different tasks.

Cursor AI Prompting Framework — Usage Guide

A disciplined, evidence-first workflow for autonomous code agents


1 · Install the Operational Doctrine

The Cursor Operational Doctrine (file core.md) encodes the agent’s always-on principles—reconnaissance before action, empirical validation over conjecture, strict command-execution hygiene, and zero-assumption stewardship.

@keithpl
keithpl / arch-linux-kubernetes.md
Last active July 18, 2024 23:38
Kubernetes on Arch Linux with Cilium and CRI-O

Install and configure CRI-O runtime.

sudo pacman -S cri-o crun iptables-nft

Create /etc/crio/crio.conf.d/00-crun.conf specifying the default runtime as crun instead of runc.

[crio.runtime]
@billyjbryant
billyjbryant / Synology NAS Boot Locked.md
Last active December 27, 2023 22:13 — forked from ludoo0d0a/gist:8d0cfd1cab22598cb5d8
Synology boot locked

Description:

Sometimes after a hard reboot (power cut), if your synology cannot be logged in with DSM and it shows "System is getting ready. Please log in later" , please do these steps :

Steps

  1. Install the syno-ready script to /usr/local/bin (You must be able to SSH to the NAS via an Admin user account)
wget https://gist.github.com/billyjbryant/993b4e8669659444006823a68f1bd509/raw/e728bfb2e9968f4c5a8ab7f7a9d316172267dc84/syno-ready
sudo mv syno-ready /usr/local/bin
sudo chmod +x /usr/local/bin/syno-ready
@tekumara
tekumara / pem_to_jwk.py
Created December 22, 2022 01:16
Convert pem to jwk
import base64
import math
from typing import Dict, cast
import cryptography.hazmat.backends.openssl.rsa as rsa
from cryptography.hazmat.primitives.serialization import load_der_private_key, load_der_public_key
from jose import jwt
# stolen from https://github.com/mpdavis/python-jose/blob/fccbcf4/tests/test_jws.py#L143
rsa_private_key = """-----BEGIN RSA PRIVATE KEY-----
@Overemployed
Overemployed / install.sh
Last active October 28, 2024 09:22
Jacktrip running on PiKVM / Raspberry Pi with arch distro
#!/bin/bash
# Check if script is running as root
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# your personal machine running jacktrip
REMOTE_JACK_SERVER=nat.local
@eatonphil
eatonphil / psql-srv.py
Last active April 18, 2025 17:32 — forked from matteobertozzi/psql-srv.py
postgres "server" wire protocol example (ported python3)
# th30z@u1310:[Desktop]$ psql -h localhost -p 55432
# Password:
# psql (9.1.10, server 0.0.0)
# WARNING: psql version 9.1, server version 0.0.
# Some psql features might not work.
# Type "help" for help.
#
# th30z=> select foo;
# a | b
# ---+---
@silver-xu
silver-xu / aws-cloudtrail-events.md
Last active February 24, 2025 05:07
AWS Cloudtrail Events unofficial document

CloudTrail Event Lists

Service Event Names Description
accessanalyzer ApplyArchiveRule  
  CancelPolicyGeneration

Cancels the requested policy generation.

  CreateAccessPreview

Creates an access preview that allows you to preview IAM Access Analyzer findings for your resource before deploying resource permissions.

  CreateAnalyzer

Creates an analyzer for your account.

  CreateArchiveRule  
  DeleteAnalyzer  
  DeleteArchiveRule  
@ejdoh1
ejdoh1 / macos-webcam-rtsp.sh
Last active July 26, 2024 01:41
MacOS webcam RTSP server & client
# local
ffmpeg -f avfoundation -framerate 30 -video_size 640x480 -i "0:none" -preset ultrafast -tune zerolatency -f mpegts udp://127.0.0.1:9090
ffplay -fflags nobuffer -flags low_delay -framedrop -strict experimental udp://127.0.0.1:9090
# remote
ffmpeg -f avfoundation -framerate 30 -video_size 640x480 -i "0:none" -preset ultrafast -tune zerolatency -f flv rtmp://REPLACEME.australiaeast.azurecontainer.io/live/test
ffplay -fflags nobuffer -flags low_delay -framedrop -strict experimental rtmp://REPLACEME.australiaeast.azurecontainer.io/live/test
@LanceMcCarthy
LanceMcCarthy / UltimateListIds.md
Last active June 29, 2025 13:09
List of Package Ids
Name Package Id Version Source
7Zip 7zip.7zip 19.0.0 winget
Altap Salamander salamander choco
Alt-Tab Terminator alt-tab-terminator choco
AutoHotkey Lexikos.AutoHotkey 1.1.33.02 winget
AutoHotkey Store Edition HaukeGtze.AutoHotkeypoweredbyweatherlights.com Latest msstore (via winget)
Carnac