Skip to content

Instantly share code, notes, and snippets.

View Kreijstal's full-sized avatar
↗️

Kreijstal Kreijstal

↗️
View GitHub Profile
@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.
@Kreijstal
Kreijstal / glbl.v
Created April 18, 2025 12:19
this is glblb.v i dont get it
`ifndef GLBL
`define GLBL
`timescale 1 ps / 1 ps
module glbl ();
parameter ROC_WIDTH = 100000;
parameter TOC_WIDTH = 0;
parameter GRES_WIDTH = 10000;
parameter GRES_START = 10000;
@Kreijstal
Kreijstal / get_windows_canonical_path.c
Created April 10, 2025 07:30
Attempting to get canonical path, for usage in ngspice..
#include <windows.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
/**
* @brief Resolves a Windows path to its canonical, absolute form using GetFullPathNameW.
*
* This function takes a path string (assumed to be UTF-8), converts it to
@Kreijstal
Kreijstal / highscore.xml
Last active April 25, 2025 04:26
supertuxkart
<?xml version="1.0"?>
<highscores version="4">
<highscore track-name ="volcano_island"
number-karts ="7"
difficulty ="3"
hscore-type ="HST_STANDARD"
number-of-laps="2"
reverse ="false">
<entry time ="135.856"
name ="kreijstal"
@Kreijstal
Kreijstal / git_server.md
Created March 27, 2025 21:09
How to set up git with nginx

Setting Up Git with Nginx for Anonymous HTTP Access

This guide explains how to configure a Git repository to be served anonymously over HTTP using Nginx and git-http-backend. This setup allows users to clone and fetch repositories without authentication, and optionally push if configured. It’s ideal for public repositories or simple internal use cases.

Prerequisites

  • A Linux server with:
    • Git installed (sudo apt install git)
    • Nginx installed (sudo apt install nginx)
    • fcgiwrap installed (sudo apt install fcgiwrap) to bridge Nginx and git-http-backend
@Kreijstal
Kreijstal / ManualGuixBuild.scm
Created January 11, 2025 00:01
Attempting to manually debug a guix build system
;; I want to build a package phase by phase, how hard can it be?
(use-modules (guix store)
(guix derivations)
(guix packages) ; Ensure this module is imported
(guix build-system gnu)
(guix build utils)
(gnu packages wine)
(guix build gnu-build-system)
(guix download) ; Import the download module
(guix base16) ; Import the base16 module for hash conversion