Skip to content

Instantly share code, notes, and snippets.

View Kreijstal's full-sized avatar
↗️

Kreijstal Kreijstal

↗️
View GitHub Profile
@Kreijstal
Kreijstal / draft.md
Last active April 23, 2025 08:20
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

  • Nodes:
@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
@Kreijstal
Kreijstal / README.md
Last active December 24, 2024 21:02
Betribsystempraktikum von TU Berlin toolchain mit guix

Overview

BSPrak is a custom setup for using QEMU through the GNU Guix package manager. This repository contains scripts and configurations to manage a custom QEMU build along with other essential tools.

Enter the Development Environment: Use guix shell to enter a shell with all necessary dependencies:

guix shell -m manifest.scm
@Kreijstal
Kreijstal / sha-256.js
Last active November 15, 2024 12:28 — forked from rumkin/sha-256.js
/*
* Bitwise rotate a 32-bit number to the left.
*/
function ROTL(num, cnt)
{
return (num << cnt) | (num >>> (32 - cnt));
}
/*
* These functions implement the basic operation for each round of the
@Kreijstal
Kreijstal / Makefile
Last active August 8, 2024 17:42
verilator windows bug iverilog cosimulation
VERILATOR = verilator
IVERILOG = iverilog
VVP = vvp
# Detect operating system
ifeq ($(OS),Windows_NT)
DETECTED_OS := Windows
else
DETECTED_OS := $(shell uname -s)
endif
@Kreijstal
Kreijstal / dm_pkg.sv
Last active July 8, 2024 14:12
verilator
/* Copyright 2018 ETH Zurich and University of Bologna.
* Copyright and related rights are licensed under the Solderpad Hardware
* License, Version 0.51 (the “License”); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law
* or agreed to in writing, software, hardware and materials distributed under
* this License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*