Skip to content

Instantly share code, notes, and snippets.

View karstengresch's full-sized avatar
:octocat:
.

Karsten Gresch karstengresch

:octocat:
.
View GitHub Profile
#!/bin/bash
# Exit on any error
set -e
# Prompt for OpenAI API Key securely
echo -n "Enter your OpenAI API Key: "
read -s OPENAI_API_KEY
echo ""
@karstengresch
karstengresch / todo-app-prompt-detailed.md
Created September 10, 2025 18:13
Example: More detailed prompt

Full-Stack Todo Application with Enterprise Features

Project Overview

Create a production-ready todo application with enterprise-grade features including authentication, REST API, comprehensive testing, and Kubernetes deployment.

Frontend Requirements

Technology Stack

  • Framework: React 18+ with TypeScript
  • State Management: Redux Toolkit or Zustand for global state
@karstengresch
karstengresch / general-purpose-pre-prompt.txt
Created September 10, 2025 17:48
General-Purpose Pre-Prompt (Tech)
Hi there! Please create a prompt based on these specifications:
<opening_declaration>
This message defines the assistant's behavior and expertise for support on the topic [SPECIFY_TOPIC].
</opening_declaration>
<core_principles>
- Use XML to separate the prompt sections, as in this instruction.
- Accuracy: Provide only verifiable information. When uncertain, explicitly state limitations.
- Transparency: Clearly distinguish between facts, interpretations, and speculation.
@karstengresch
karstengresch / settings_snippet.json
Created July 21, 2025 09:44 — forked from fredgrott/settings_snippet.json
full VSCode Foam settings
{
// indirect Foam settings overrided for editor
"editor.minimap.enabled": true,
"editor.minimap.maxColumn": 120,
"editor.minimap.renderCharacters": true,
"editor.minimap.scale": 1,
"editor.minimap.showSlider": "always",
"editor.minimap.side": "right",
"editor.minimap.size": "fit",
"editor.wrappingIndent": "indent",
#!/bin/bash
# macOS Silverback Debloater
# v1.0 by Wamphyre
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# Disabling Spotlight
@karstengresch
karstengresch / index.js
Created September 6, 2023 09:30 — forked from vralle/index.js
Use post meta in gutenberg
// https://make.wordpress.org/core/2020/03/02/general-block-editor-api-updates/
// https://github.com/WordPress/gutenberg/tree/trunk/packages/core-data
import {
PanelRow, TextControl,
} from '@wordpress/components';
import { useSelect } from '@wordpress/data';
import { useEntityProp } from '@wordpress/core-data';
import { PluginDocumentSettingPanel } from '@wordpress/edit-post';
import { registerPlugin } from '@wordpress/plugins';
<?php
/**
* Plugin Name: [Forminator] Skip Steps in Pagination Form
* Plugin URI: https://premium.wpmudev.org
* Description: With this snippet and some extra configurations in your form is possible to skip steps according to user-selected choices in a control field - works with checkboxes, radio buttons and selects.
* Author: Glauber Silva @ WPMUDEV
* Author URI: https://premium.wpmudev.org
* Jira Task: FOR-428 and SLS-263 and SLS-2035
* License: GPLv2 or later
*
@karstengresch
karstengresch / Highlight CPT Archive and wp_nav_menu parents
Created May 23, 2023 17:15 — forked from VlooMan/Highlight CPT Archive and wp_nav_menu parents
Highlight the CPT (Custom Post Type) Archive & its Parents ("current-menu-parent") & its Ancestors ("current-menu-ancestor") in the WordPress Navigation wp_nav_menu() when viewing the Archive itself or a single detail page of the CPT. Let's say you have CPT called "projects" and you have a WordPress menu set as "My Work (link to a page) > Projec…
/**
* Gist Name: Highlight CPT Archive and wp_nav_menu parents
* Author: VlooMan
* Author URI: http://ishyoboy.com
*
* Highlight the CPT (Custom Post Type) Archive & its Parents ("current-menu-parent")
* & its Ancestors ("current-menu-ancestor") in the WordPress Navigation wp_nav_menu() when viewing the Archive itself
* or a single detail page of the CPT.
*
* Let's say you have CPT called "projects" and you have a WordPress menu set as
@karstengresch
karstengresch / extensions.list
Created March 13, 2023 02:05
My VSC extensions as of 2023-03-13
a5hk.night-coder
alefragnani.Bookmarks
alefragnani.project-manager
arcticicestudio.nord-visual-studio-code
barjo.anirak
bceskavich.theme-dracula-at-night
bmewburn.vscode-intelephense-client
CarloCardella.hogwarts-colors-dark
Claudius.classic-terminal
contextmapper.context-mapper-vscode-extension
@karstengresch
karstengresch / keybindings.json
Created March 13, 2023 00:04
My keybindings.json as of 2023-03-13
/* KG's KBS */
[
{
"key": "shift shift",
"command": "workbench.action.showCommands"
},
{
"key": "shift+cmd+t",
"command": "workbench.action.terminal.focus"
},