Skip to content

Instantly share code, notes, and snippets.

View lkarlslund's full-sized avatar
:octocat:
Probably coding

Lars Karlslund lkarlslund

:octocat:
Probably coding
View GitHub Profile
@lkarlslund
lkarlslund / glm4.7flash-opencode.md
Created January 21, 2026 15:34
Run GLM 4.7 Flash with OpenCode on RTX 5090 (or other 32GB+ setups)

Run GLM 4.7 Flash with OpenCode on RTX 5090

Grab latest llama.cpp sources and build it:

git clone https ://github.com/ggml-org/llama.cpp/
cmake llama.cpp -B llama.cpp/build -DBUILD_SHARED_LIBS=OFF -DGGML_CUDA=ON
cmake --build llama.cpp/build --config Release -j --clean-first --target llama-cli llama-mtmd-cli llama-server llama-gguf-split
@lkarlslund
lkarlslund / gist:85ceeb0813a9cf10e7525013e309f725
Last active October 23, 2025 07:12
Running Qwen3 Next 80B A3B Q2_0 on RTX 5090 (32GB VRAM)
The Qwen3 Next 80B A3B Q2 quant fits on 32GB VRAM with 50K context. Here's how - it's bleeding edge so you'll need to compile llama-cpp yourself.
Build:
git clone https://github.com/cturan/llama.cpp.git llama.cpp-qwen3-next
cd llama.cpp-qwen3-next
git checkout qwen3_next
time cmake -B build -DGGML_CUDA=ON
time cmake --build build --config Release --parallel $(nproc --all)
@lkarlslund
lkarlslund / solver.go
Created April 9, 2025 13:41
FE påske challenge
package main
import (
"fmt"
"time"
)
func easter(year int) time.Time {
a := year % 19
b := year / 100
@lkarlslund
lkarlslund / deploy-leaf.sh
Last active August 12, 2025 10:12
Deploy LEAF Bering uClibc 7.3.1 and later to dual BIOS / EFI bootable USB
#!/bin/bash
SCRIPT=$(readlink -f $0)
DISK="$1"
IMAGE="$2"
# Check if IMAGE variable is set and non-empty
if [ -n "$IMAGE" ]; then
@lkarlslund
lkarlslund / virtual_pinball_nudge_plunger_joystick.ino
Created May 5, 2023 13:18
Nudge sensor for Virtual Pinball machine using Arudino Micro and MPU6050 accelerometer
#include <Wire.h>
#include <Adafruit_MPU6050.h>
#include <Adafruit_Sensor.h>
#include <Joystick.h>
// #include <Keyboard.h>
// Define the MPU6050 object
Adafruit_MPU6050 mpu;
// Define the joystick object
@lkarlslund
lkarlslund / index.html
Created October 26, 2021 08:21
Floating resizable windows
<!DOCTYPE html><html>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script type="text/javascript" src="https://code.jquery.com/ui/1.13.0/jquery-ui.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.13.0/themes/base/jquery-ui.css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/css/halfmoon-variables.min.css" rel="stylesheet" />
<script>
$( function() {
$("#win_1").draggable();
$("#win_1").resizable({
maxHeight: 250,
@lkarlslund
lkarlslund / integers.go
Last active July 27, 2018 10:28
Golang integer performance
package performance
import (
"testing"
)
var (
u8 uint8
u16 uint16
u32 uint32