Skip to content

Instantly share code, notes, and snippets.

View hizkifw's full-sized avatar
🍝

Hizkia Felix hizkifw

🍝
View GitHub Profile
@hizkifw
hizkifw / harness.py
Last active April 24, 2026 03:57
Minimal implementation of an LLM harness in Python, with zero dependencies.
"""
harness.py
Minimal implementation of an LLM harness in Python, with zero dependencies.
Configure using environment variables
| Variable | Description | Example |
| ---------------- | ----------------------- | ------------------------- |
| HARNESS_ENDPOINT | Base URL of the LLM API | https://api.openai.com/v1 |
#!/bin/bash
# Clipboard synchronization script for X11/Xwayland to Wayland
# Monitors X11 clipboard and syncs to Wayland when it changes
# Note: wl-clip-persist is required (https://github.com/Linus789/wl-clip-persist)
# Prevent multiple instances
# Use XDG_RUNTIME_DIR if available, fallback to /run/user/$UID, then /tmp
if [ -n "$XDG_RUNTIME_DIR" ] && [ -d "$XDG_RUNTIME_DIR" ]; then
LOCKFILE="$XDG_RUNTIME_DIR/clipboard-sync.lock"
@hizkifw
hizkifw / ai.sh
Last active October 25, 2024 05:40
Invoke LLMs from the command line
#!/usr/bin/env bash
#
# ai.sh - invoke llm from command line
#
# Usage:
# * Run interactively
# ai.sh
#
# * Invoke a single inference from command line
# ai.sh ffmpeg convert all mp4 in this folder to mp3
@hizkifw
hizkifw / VDHop.ahk
Last active February 23, 2026 02:33
AutoHotKey script for virtual desktop management
; Set the name or path of the executable
; https://github.com/MScholtes/VirtualDesktop
Global virtualDesktopExe := "VirtualDesktop11.exe"
SwitchDesktop(desktopNum) {
Run, %virtualDesktopExe% /Animation:0 /Switch:%desktopNum%,, Hide
}
MoveWindowToDesktop(desktopNum) {
Run, %virtualDesktopExe% /GetDesktop:%desktopNum% /MoveActiveWindow,, Hide
@hizkifw
hizkifw / docker-nvidia.sh
Last active May 3, 2024 02:23
Setup script for docker + nvidia-container-toolkit for Ubuntu
#!/bin/sh
command_exists() {
command -v "$@" > /dev/null 2>&1
}
do_install() {
set -e
user="$(id -un 2>/dev/null || true)"
@hizkifw
hizkifw / ollama_dl.sh
Created April 25, 2024 08:55
Download gguf models from ollama's repository
#!/usr/bin/env bash
set -euo pipefail
model_name="$1"
if [[ -z "$model_name" ]]; then
echo "Usage: $0 <model_name>"
exit 1
fi
@hizkifw
hizkifw / notebook.sh
Last active August 8, 2023 05:22
Create a Jupyter env
#!/usr/bin/env bash
python -m venv venv
. ./venv/bin/activate
python -m pip install jupyter jupyterlab ipywidgets notebook numpy pandas scipy matplotlib Pillow seaborn tqdm
python -m jupyter lab
apiVersion: v1
kind: Config
clusters:
- name: dummy
cluster:
api-version: v1
server: http://example.com
contexts:
- name: dummy
context:
@hizkifw
hizkifw / CompactDockerVdisk.ps1
Last active August 2, 2023 01:42
PowerShell script to prune images and compact Docker Desktop's VHDX disk on Windows
<#
.SYNOPSIS
Prune and compact the Docker VHDX disk file
#>
# Check if running as administrator
$CurrentUser = New-Object Security.Principal.WindowsPrincipal `
$([Security.Principal.WindowsIdentity]::GetCurrent())
if (-not $CurrentUser.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
# Restart as administrator

How to mount cephfs

  1. Create authorization
    root@cephhost:~# ceph fs authorize cephfs client.clientname /some/path rw
    [client.clientname]
            key = ...............
    

Save it in the machine where you wanna mount, at /etc/ceph/ceph.client.clientname.keyring