Skip to content

Instantly share code, notes, and snippets.

View Kreijstal's full-sized avatar
↗️

Kreijstal Kreijstal

↗️
View GitHub Profile
#hasto kinda run as root.
cpupower frequency-set -g powersave --max 1000000
echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo
You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
====
### MARKDOWN RULES
ALL responses MUST show ANY `language construct` OR filename reference as clickable, exactly as [`filename OR language.declaration()`](relative/file/path.ext:line); line is required for `syntax` and optional for filename links. This applies to ALL markdown responses and ALSO those in <attempt_completion>
====
function get_content(data) {
let content_parts = [];
// This recursive helper function will walk through any nested structure.
function find_strings_recursively(item) {
// Base Case: If the item is a string, process it.
if (typeof item === 'string') {
// This is our filter. We want the content, not the metadata.
// We exclude the "model" identifier and the "thought process" monologues.
if (item !== 'model' && !item.startsWith('**')) {
@Kreijstal
Kreijstal / typst.html
Last active June 17, 2025 14:46
typst playground
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Typst.ts Live Editor (Modern API)</title>
<style>
body { font-family: sans-serif; display: flex; gap: 1rem; margin: 1rem; height: 95vh; background-color: #f4f4f4; }
.panel { flex: 1; display: flex; flex-direction: column; border: 1px solid #ccc; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
h3 { margin: 0; padding: 0.75rem; background-color: #e9ecef; border-bottom: 1px solid #ccc; font-size: 1rem; font-weight: 600; }
textarea { flex: 1; border: none; padding: 1rem; font-family: 'Courier New', Courier, monospace; font-size: 14px; resize: none; outline: none; background-color: #fff; }
@Kreijstal
Kreijstal / KernelDbgPrint.c
Created June 5, 2025 13:01
let us print debug messages.
//gcc KernelDbgPrint.c -o KernelDbgPrint.exe -lkernel32 -luser32
#include <windows.h>
#include <stdio.h> // For printf, fprintf, getchar
#include <string.h> // For strncpy_s if available, or strncpy + manual null termination
// Names of the synchronization objects
#define BUFFER_NAME L"DBWIN_BUFFER"
#define DATA_READY_EVENT_NAME L"DBWIN_DATA_READY"
#define BUFFER_READY_EVENT_NAME L"DBWIN_BUFFER_READY"
@Kreijstal
Kreijstal / handshake.jsonrpc
Created May 27, 2025 16:57
jsonrpc handshake
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"testing","version":"0.0.1"}}}
{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}
{"jsonrpc":"2.0","method":"tools/list","params":{},"id":"some_unique_id_1"}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Real-time Format Converter</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
import ctypes
from ctypes import wintypes
# Define constants from your C code if needed (e.g. MAX_PATH used in buffer creation)
MAX_PATH_FOR_BUFFER = 260 # Or a larger reasonable size
# Load the DLL
try:
# Ensure the DLL is in the same directory as the script,
# or in a directory on the system's PATH, or provide the full path.
@Kreijstal
Kreijstal / settings.json
Last active May 11, 2025 16:28
msys2 on vscode
{
"terminal.integrated.defaultProfile.linux": "",
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
@Kreijstal
Kreijstal / draft.md
Last active May 7, 2025 14:16
protocircuit

Proto-Language Specification for Textual Circuit Description

1. Overview

This document specifies a simple textual format for describing electronic circuits, primarily focusing on small-signal models, basic connections, and simple sources. The goal is to provide a human-readable way to represent circuit topology and components connecting different nodes. It is not intended to be a fully-featured netlist language like SPICE but serves as a clear communication tool.

2. Syntax

  • Component Declarations:
  • Components, including sources, must be explicitly declared before use or as they are introduced.