Skip to content

Instantly share code, notes, and snippets.

@alexewerlof
alexewerlof / nano-banana-structured-json-prompt
Created December 19, 2025 17:44
Nano Banana structured JSON prompt Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Nano Banana (Gemini 3 Pro) Ultimate Image Schema",
"description": "The definitive structured prompting schema for high-fidelity image generation. Includes advanced photography, multi-subject control, and text rendering.",
"type": "object",
"required": ["meta", "subject", "scene"],
"properties": {
"user_intent": {
"type": "string",
"description": "A natural language summary of your goal (e.g., 'Me high-fiving Batman in a neon city'). Useful for logging."
@JPvRiel
JPvRiel / SysRq magic keys.md
Created January 9, 2019 02:26
SysRq magic keys

sysrq magic keys

This is useful for trying to recover from an unresponsive system. However, by default, Ubuntu disables the key to gain raw keyboard access.\

Sometimes part of the issue is that X/Wayland display servers have crashed due to bad graphics drivers and keyboard input isn't processed anymore, whereby changing to another console, e.g. ctrl + alt + F1 doesn't work. Since the default disables keyboard control, alt + sysrq + r, can't help salvage the situation. Hence the suggestion to at least enable system request raw keyboard control when trying to recover a system.

Ubuntu doesn't enable control of keyboard by default

Ubuntu 16.04 LTS default value:

@fnky
fnky / ANSI.md
Last active March 10, 2026 14:23
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@mbinna
mbinna / effective_modern_cmake.md
Last active March 6, 2026 04:06
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft