Skip to content

Instantly share code, notes, and snippets.

View tristan-k's full-sized avatar

ʞ-uɐʇsıɹʇ tristan-k

  • Germany
View GitHub Profile
@tristan-k
tristan-k / README.md
Created November 7, 2025 17:19 — forked from paoloaveri/README.md
Running llama.cpp on GPU on Intel Mac

I found a way to run llama.cpp with GPU support on my 2019 Intel MacBook Pro, with the help of Vulkan.

Thanks to ollama/ollama#1016 (comment) an following comments which helped me find the right build flags.

First download MoltenVK-macos.tar (I used v1.3.0-rc1 at the time) from https://github.com/KhronosGroup/MoltenVK/releases

Not sure all these packages are required, but I ran brew install libomp vulkan-headers glslang molten-vk shaderc vulkan-loader. You probably also need to install cmake and potentially other tools I already had installed on my system.

Then clone and build llama.cpp (replace /path/to/MoltenVK_macos with the actual path you have MoltenVK_macos):

@tristan-k
tristan-k / cdm_fio.sh
Created November 7, 2025 17:18 — forked from snizovtsev/cdm_fio.sh
Reproducing CrystalDiskMark tests with fio - fixes for https://unix.stackexchange.com/revisions/480191/9
#!/bin/bash
# This script is based on https://unix.stackexchange.com/revisions/480191/9 .
# The following changes proved to be necessary to make it work on CentOS 7:
# * removed disk info (model, size) - not very useful, might not work in many cases.
# * using "bw" instead of "bw_bytes" to support fio version 3.1 (those availible through yum @base)
# * escaping exclamation mark in sed command
# * the ".fiomark.txt" is not auto-removed
LOOPS=5 #How many times to run each test

How to properly install android-tools in Fedora

Currently, it seems as if Fedora doesn't install udev-rules, to get this working, I've had to manually install them from a community project. I'm not very knowledgable in Linux, these are just the steps I had to do to get things working that I'd like to document.

Install android-tools

Install android-tools from DNF.

sudo dnf install android-tools
@tristan-k
tristan-k / launch-GRD.sh
Last active June 28, 2025 12:13 — forked from greyltc/launch-GRD.sh
configures then activates gnome-remote-desktop from the command line
#!/usr/bin/env bash
# run this on the remote terminal machine, as auser with sudo powers, probably through a remote ssh shell
# this will overwrite all the settings it touches
# the name of the user to run these commands as
TARGET_USER=$USER
# we need an inlocked desktop session. we can either start a new autologin one or unlock an existing one
```
$ cat /root/autoshutdown.sh
#!/bin/bash
qm list | grep running
if [ $? -eq 1 ]
then
shutdown -h now
fi
```
@tristan-k
tristan-k / EncryptedHomeFolder.md
Created August 13, 2019 12:26 — forked from chetstone/EncryptedHomeFolder.md
Encrypted APFS Home Folder on Mac OSX

Encrypted APFS Home Folder on Mac OSX

Note: This is an update of Will Haley's excellent post to use APFS instead of CoreStorage.

I'll add to Will's warning below that this is a complex process on MacOS because the OS has a lot of assumptions on where things are. I

@tristan-k
tristan-k / gerbera.io.plist
Created May 29, 2017 07:21 — forked from elmodaddyb/gerbera.io.plist
Gerbera OSX Launchd
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>gerbera.io</string>
<key>ProgramArguments</key>
<array>
@tristan-k
tristan-k / dev.py
Created January 24, 2017 16:41
cat dev.py
from .base import *
# WEB SITE URL
THIS_BOOKTYPE_SERVER = '85.214.38.3'
BOOKTYPE_URL = 'http://85.214.38.3'
# BOOKTYPE_URL = 'http://{}'.format(THIS_BOOKTYPE_SERVER)
STATIC_URL = '{}/static/'.format(BOOKTYPE_URL)
DATA_URL = '{}/data/'.format(BOOKTYPE_URL)
@tristan-k
tristan-k / base.py
Last active January 24, 2017 16:39
cat base.py
# -*- coding: utf-8 -*-
import os
from unipath import Path
import djcelery
djcelery.setup_loader()
# DJANGO ADMIN
ADMINS = (
# ('censored', '[email protected]'),
@tristan-k
tristan-k / error.log
Created January 24, 2017 16:16
cat /var/log/apache2/error.log
$ cat /var/log/apache2/error.log
[Tue Jan 24 12:03:28.565032 2017] [mpm_event:notice] [pid 16834:tid 139748292564864] AH00489: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Tue Jan 24 12:03:28.565138 2017] [core:notice] [pid 16834:tid 139748292564864] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jan 24 12:03:30.824836 2017] [mpm_event:notice] [pid 16834:tid 139748292564864] AH00491: caught SIGTERM, shutting down
[Tue Jan 24 12:03:32.156095 2017] [wsgi:warn] [pid 17024:tid 140183461709696] mod_wsgi: Compiled for Python/2.7.8.
[Tue Jan 24 12:03:32.156171 2017] [wsgi:warn] [pid 17024:tid 140183461709696] mod_wsgi: Runtime using Python/2.7.9.
[Tue Jan 24 12:03:32.157446 2017] [mpm_event:notice] [pid 17024:tid 140183461709696] AH00489: Apache/2.4.10 (Debian) mod_wsgi/4.3.0 Python/2.7.9 configured -- resuming normal operations
[Tue Jan 24 12:03:32.157469 2017] [core:notice] [pid 17024:tid 140183461709696] AH00094: Command line: '/usr/sbin/apache2'