Skip to content

Instantly share code, notes, and snippets.

@sebastiancarlos
sebastiancarlos / show_notifications.bash
Last active October 22, 2026 19:27
Show notifications in your terminal
# All my gist code is licensed under the terms of the MIT license.
# Video demo: https://www.youtube.com/shorts/WVyqVkGYb4k
# Add this somewhere in ~/.bashrc
# write_message
# - write a message on the lower right corner of the terminal
function write_message () {
if [[ "$#" -eq 0 ]]; then
@0xmfbk
0xmfbk / php2shell-hunting.kql
Last active October 22, 2026 19:27
KQL hunting query for PHP2Shell RCE (Microsoft Defender XDR)
// PHP2Shell RCE Hunting | Microsoft Defender XDR
// Fixed: 8.5.12 / 8.4.27 / 8.3.36 / 8.2.35
// ===== Variables =====
let Lookback = 30d;
let Shells = dynamic([
"sh","zsh","dash","bash","ash","busybox",
"cmd.exe","powershell.exe","pwsh.exe",
"powershell","pwsh","node","python","python3","perl"

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@kremit
kremit / Build_instructions.md
Last active October 22, 2026 19:23 — forked from shurshur/Build_instructions.md
Build remi-php 8.2.35 for CentOS 7 (el7), system NON-SCL variant

Rebuild Remi PHP 8.2.35 for EL7 (CVE-2026-109618 / CVE-2026-109619)

Disclaimer: no warranty, use at your own risk. Remi does not support EL7 anymore, and the EL7 mirrors are archives.

Based on: https://gist.github.com/shurshur/5610fc58cf2d9a162a948fa84f3f42b7

That recipe built the SCL variant (php82-php-* under /opt/remi). This one rebuilds the base packages as a drop-in update. See Differences from the original gist.

8.2.35 is the upstream fix. The result is php-*-8.2.35-1.el7.remi.1, a drop-in update for remi-php82

To update all outdated pip packages in Windows run:

python -m pip freeze | % { $_.split('==')[0] } | %{ python -m pip install --upgrade $_ }

Oh no! The frogs are all squeezed onto a single row of lilypads. Spread them out using the flex-wrap property, which accepts the following values:

  • nowrap: Every item is fit to a single line.
  • wrap: Items wrap around to additional lines.
  • wrap-reverse: Items wrap around to additional lines in reverse.

The two properties flex-direction and flex-wrap are used so often together that the shorthand property flex-flow was created to combine them. This shorthand property accepts the value of the two properties separated by a space.

For example, you can use flex-flow: row wrap to set rows and wrap them.

export const metadata: Metadata = {
title: "Legacy Upscale - Enhance Your Images with AI",
description: "Legacy Upscale uses cutting-edge AI to upscale and enhance your images effortlessly. Try it now for stunning results.",
keywords: ['AI image upscaling', 'image enhancement', 'photo editing', 'Legacy Upscale', 'AI tools'],
authors: [{ name: 'Your Name', url: 'https://yourdomain.com' }],
openGraph: {
title: 'Legacy Upscale - Enhance Your Images with AI',
description: 'Discover Legacy Upscale, the ultimate AI-powered tool for image enhancement and upscaling. Perfect for photographers and designers.',
url: 'https://yourdomain.com',
siteName: 'Legacy Upscale',
@jorgeadev
jorgeadev / turborepo.md
Last active October 22, 2026 19:18
Turborepo Config Template

Crear un monorepo con configuraciones compartidas, una aplicación Next.js, Prisma ORM con PostgreSQL y despliegue en Vercel implica el uso de herramientas como Turborepo o pnpm workspaces para gestionar el repositorio y Vercel/Prisma para la base de datos y el despliegue.  Aquí tienes una guía completa paso a paso:

I. Configuración Inicial del Monorepo

Utilizaremos Turborepo y pnpm workspaces como base para el monorepo. 

1. Instalar pnpm (si no lo tienes):

npm install -g pnpm

2. Crear el monorepo con Turborepo:

Reflecting Database Changes in the UI - Next.js Best Practices

There are several ways to reflect database changes in the UI in Next.js. Here are the correct approaches:

1. revalidatePath() - Best for Server Actions ✅ (Recommended)

Use this inside your server action to invalidate the cache for a specific path:

"use server";

🌳 Git Branching Strategy & Naming Convention

This document defines the official branching strategy and naming conventions for this repository.

The goal is to keep the workflow clean, predictable, and scalable, while making collaboration and CI/CD easier.


🎯 General Rules