Skip to content

Instantly share code, notes, and snippets.

View christian-korneck's full-sized avatar
💭
I may be slow to respond.

Christian Korneck christian-korneck

💭
I may be slow to respond.
View GitHub Profile
@jake-stewart
jake-stewart / color256.md
Last active March 9, 2026 20:31
Terminals should generate the 256-color palette

Terminals should generate the 256-color palette from the user's base16 theme.

If you've spent much time in the terminal, you've probably set a custom base16 theme. They work well. You define a handful of colors in one place and all your programs use them.

The drawback is that 16 colors is limiting. Complex and color-heavy programs struggle with such a small palette.

@burkeholland
burkeholland / game.prompt.md
Last active January 8, 2026 13:29
GPT-5 Mini Games Prompt

You are an expert game developer and visual designer.
Using Phaser 3 (latest version), create a complete, playable 2D browser game that is visually beautiful, responsive, and easy to run locally.

Requirements:

  • Theme: [Let the AI choose a unique, cohesive theme with mood and tone]
  • Gameplay: Must be simple to learn but addictive (e.g., score-based survival, puzzle, or endless runner).
  • Art Style: Aesthetic and polished — use a consistent color palette, smooth animations, and subtle particle effects.
  • Audio: Include simple background music and sound effects (royalty-free links).
  • Code Quality: Well-commented, clean, and easy to modify.
  • File Structure: Provide all HTML, JS, and asset links in a way that runs locally by just opening index.html in a browser.
@omenos
omenos / ChatGPT-4o.md
Last active April 7, 2025 03:05
Using AI models to generate Terraform configurations

Here's a Terraform configuration using the oracle/oci provider (version ~> 6.0) that provisions a virtual server in Oracle Cloud Infrastructure (OCI) with the specified requirements:

Terraform Configuration

terraform {
  required_providers {
    oci = {
      source  = "oracle/oci"
      version = "~> 6.0"
@jwbee
jwbee / jq.md
Last active December 25, 2025 23:33
Make Ubuntu packages 90% faster by rebuilding them

Make Ubuntu packages 90% faster by rebuilding them

TL;DR

You can take the same source code package that Ubuntu uses to build jq, compile it again, and realize 90% better performance.

Setting

I use jq for processing GeoJSON files and other open data offered in JSON format. Today I am working with a 500MB GeoJSON file that contains the Alameda County Assessor's parcel map. I want to run a query that prints the city for every parcel worth more than a threshold amount. The program is

@amouat
amouat / fortify.c
Last active January 10, 2025 09:02
Exercising _FORTIFY_SOURCE in gcc (clang should work as well)
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
/*
* Simple test program for FORTIFY_SOURCE.
*
* Compile with the following to test with no source fortification and stack protection off:
* gcc -D_FORTIFY_SOURCE=0 -fno-stack-protector fortify.c -o fortify
*
@jborean93
jborean93 / PwshPipeServer.cs
Created December 10, 2024 06:25
Code to run a PowerShell named pipe server as a Task
using System;
using System.Management.Automation.Remoting;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
#nullable enable
/*
This code uses internal APIs of the PowerShell remoting system to create the
@kyleavery
kyleavery / pdf_to_md.py
Created December 1, 2024 23:53
PDF to Markdown
import os
import base64
from concurrent.futures import ThreadPoolExecutor, as_completed
import openai
from pdf2image import convert_from_path
from PIL import Image
@asheroto
asheroto / README.md
Last active March 9, 2026 21:54
Bypass Windows 11 Upgrade Assistant / PC Health Check / TPM and CPU Settings. Ignore PC Health Check results.

Bypass Windows 11 Upgrade Assistant / Setup Hardware Checks (TPM, CPU, RAM)

This PowerShell script allows you to bypass TPM 2.0, unsupported CPU, and memory checks enforced by the Windows 11 Upgrade Assistant and setup.exe from Windows installation media. It eliminates common upgrade blocks such as:

  • This PC doesn't currently meet Windows 11 system requirements.
  • TPM 2.0 must be supported and enabled on this PC.
  • The processor isn't currently supported for Windows 11.

What It Does

@antonputra
antonputra / gist:533fdd507f797cc30b082eed2c4f6fb4
Created August 23, 2024 20:22
Golang Dockerfile with upx
FROM golang:1.23.0-bookworm AS build
ARG upx_version=4.2.4
RUN apt-get update && apt-get install -y --no-install-recommends xz-utils && \
curl -Ls https://github.com/upx/upx/releases/download/v${upx_version}/upx-${upx_version}-amd64_linux.tar.xz -o - | tar xvJf - -C /tmp && \
cp /tmp/upx-${upx_version}-amd64_linux/upx /usr/local/bin/ && \
chmod +x /usr/local/bin/upx && \
apt-get remove -y xz-utils && \
rm -rf /var/lib/apt/lists/*
@jborean93
jborean93 / New-ScheduledTaskSession.ps1
Last active September 4, 2025 08:50
Creates a PSSession that targets a scheduled task process
# Copyright: (c) 2024, Jordan Borean (@jborean93) <jborean93@gmail.com>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
Function New-ScheduledTaskSession {
<#
.SYNOPSIS
Creates a PSSession for a process running as a scheduled task.
.DESCRIPTION
Creates a PSSession that can be used to run code inside a scheduled task