Skip to content

Instantly share code, notes, and snippets.

Complete Guide: Multi-Instance Ollama Setup with NPU, Intel GPU, NVIDIA GPU, and CPU

System: Fedora 43 Linux Desktop Hardware: Intel Core Ultra 7 268V (Meteor Lake) with NPU, Intel Arc iGPU, NVIDIA RTX 4060 Laptop GPU Setup Date: 2026-01-10 Author: Claude Code Version: 2.0 - Comprehensive Edition Purpose: Run 4 independent Ollama instances simultaneously on different hardware accelerators for optimal power/performance/cost flexibility


@RobinHerbots
RobinHerbots / index.html
Created June 14, 2024 15:16 — forked from JustinK/index.html
MapMyRun API Demo
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-lg-12">
<!-- This is where we are going to put the graph -->
@RobinHerbots
RobinHerbots / index.html
Created June 14, 2024 15:16 — forked from JustinK/index.html
MapMyRun API Demo
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-lg-12">
<!-- This is where we are going to put the graph -->
@RobinHerbots
RobinHerbots / OpenType.ts
Created September 11, 2023 18:37 — forked from smhanov/OpenType.ts
Here is my implementation of a TrueType font reader in Typescript. You can read a font directly from an ArrayBuffer, and then call drawText() to draw it. See my article http://stevehanov.ca/blog/index.php?id=143. The second file, OpenType.ts is the same thing but it handles more TrueType files. It is also more coplex
// To see this run, you first stub out these imports. Then put the file in a Uint8Array.
// let slice = new Slice(array);
// let font = new OTFFont(slice);
// Then you can call methods like font.drawText(canvasContext, )
//
//
import { ICanvasContext } from "./ICanvasContext"
import { log as Log } from "./log"
const log = Log.create("OPENTYPE");
@RobinHerbots
RobinHerbots / configure.md
Created December 29, 2022 07:41 — forked from jherax/configure.md
VS Code: Debugging with Jest

VS Code: Debugging Jest

Sometimes, debugging with console.log is not enough to find out what is happening in the code, as console.log prints only plain objects but neither functions nor objects with circular references. Besides, it's possible you may need to know the context and flow of the code.

Read more about debugging with VS Code in VS Code: Debugging.

@RobinHerbots
RobinHerbots / renderWithRouterMatchExample.js
Created December 6, 2022 07:39 — forked from adamjarling/renderWithRouterMatchExample.js
Example of a Testing Library renderWith helper function to include React Router match object in tests
// Component example
// ContentWrapper.jsx
import React from "react";
import Main from "./Main";
import { withRouter } from "react-router-dom";
const ContentWrapper = ({ children, match }) => (
<Main>
<p>Match id: {match.params.id}</p>
{children}
@RobinHerbots
RobinHerbots / event-offset-polyfill.js
Created October 2, 2021 18:18 — forked from ripter/event-offset-polyfill.js
Adds MouseEvent .offsetX and .offsetY to Firefox
// polyfill for event.offsetX/offsetY
// Firefox is the only browser that doesn't support it (IE has since 4)
(function() {
var evt = document.createEvent('MouseEvent');
if (evt.offsetX === void 0) {
Object.defineProperties(MouseEvent.prototype, {
'offsetX': {
get: function() {
return this.layerX - this.target.offsetLeft;
}
@RobinHerbots
RobinHerbots / usp_CreateTypeFromTable.sql
Last active August 24, 2020 12:50
usp_CreateTypeFromTable.sql
CREATE PROCEDURE [dbo].[usp_CreateTypeFromTable] @TableName SYSNAME,
@TypeName SYSNAME
AS
BEGIN
DECLARE @sql NVARCHAR(MAX) = N'';
SELECT @sql = @sql + N',' + CHAR(13) + CHAR(10) + CHAR(9) +
QUOTENAME(c.name) + ' ' + s.name +
IIF(LOWER(s.name) LIKE '%char',
'(' +
$('#GetFile').on('click', function () {
$.ajax({
url: 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/172905/test.pdf',
method: 'GET',
xhrFields: {
responseType: 'blob'
},
success: function (data) {
var a = document.createElement('a');
var url = window.URL.createObjectURL(data);
@RobinHerbots
RobinHerbots / gist:5eda12d1921c9c8bcd7737aec327ec9a
Created June 21, 2019 14:11 — forked from pmhsfelix/gist:4151369
Generating and validating JWT tokens using JWTSecurityTokenHandler
[Fact]
public void First()
{
var tokenHandler = new JWTSecurityTokenHandler();
var symmetricKey = GetRandomBytes(256/8);
var now = DateTime.UtcNow;
var tokenDescriptor = new SecurityTokenDescriptor
{
Subject = new ClaimsIdentity(new Claim[]