notes

Log | Files | Refs

commit 73dfbb62270c6a6d5948be7cb8a7e3cc1b8bc352
parent 562364f07dda265368089f0f5fb78a49eb589449
Author: ling0x <ling0x@users.noreply.github.com>
Date:   Thu, 11 Jun 2026 14:27:09 +0100

refactor: ollama

Diffstat:
Mcommands/llama-cpp.md | 12+++++++++++-
Acommands/ollama.md | 31+++++++++++++++++++++++++++++++
Dfood/bulletproof-coffee-keto.md | 76----------------------------------------------------------------------------
Dfood/cardamom-coffee-and-tea.md | 96-------------------------------------------------------------------------------
Dfood/steamed-white-clams.md | 31-------------------------------
Dfood/white-clam-soup.md | 41-----------------------------------------
6 files changed, 42 insertions(+), 245 deletions(-)

diff --git a/commands/llama-cpp.md b/commands/llama-cpp.md @@ -9,11 +9,21 @@ curl -fsSL https://llama.app/install.sh | sh Serve on a custom port (terminal 1): ```bash -llama serve -hf google/gemma-4-31B-it-qat-q4_0-gguf:Q4_0 --port 9090 +llama serve \ + -hf google/gemma-4-31B-it-qat-q4_0-gguf:Q4_0 \ + --port 9090 \ + -np 1 \ + -c 8192 ``` `--port 9090` binds to 9090 instead of the default 8080. +### Context size + +The context overflow you hit is because the server defaulted to 4096 tokens. pi's system prompt + tools + your message exceeded that. Restart with a larger context using `-c 8192` as above. + +If 8192 still overflows on large tasks, try `-c 16384` (your 4090 may fit it with `-np 1`). + Use with pi (terminal 2): ```bash diff --git a/commands/ollama.md b/commands/ollama.md @@ -0,0 +1,31 @@ +# Ollama + +### Test 1: Non-streaming (stream: false) + +```bash +curl -X POST http://127.0.0.1:11434/api/generate \ + -H "Content-Type: application/json" \ + -d '{ + "model": "gemma4:26b", + "prompt": "Say hello in JSON: {\"message\":\"hello\"}", + "system": "You respond only with JSON.", + "stream": false, + "format": "json", + "options": {"temperature": 0, "num_predict": 128} + }' +``` + +### Test 2: Streaming (stream: true) + +```bash +curl -X POST http://127.0.0.1:11434/api/generate \ + -H "Content-Type: application/json" \ + -d '{ + "model": "gemma4:26b", + "prompt": "Say hello in JSON: {\"message\":\"hello\"}", + "system": "You respond only with JSON.", + "stream": true, + "format": "json", + "options": {"temperature": 0, "num_predict": 128} + }' +``` diff --git a/food/bulletproof-coffee-keto.md b/food/bulletproof-coffee-keto.md @@ -1,76 +0,0 @@ -# Bulletproof Coffee for the Ketogenic Diet - -Bulletproof coffee — also called butter coffee or keto coffee — is a high-fat, -zero-carb morning drink designed to fuel a ketogenic lifestyle. By blending -coffee with healthy fats, it provides sustained energy, supports ketosis, and -keeps hunger at bay for hours, often replacing breakfast entirely. - ---- - -## What Is Bulletproof Coffee? - -Originated by Dave Asprey, the concept involves blending freshly brewed coffee -with a source of saturated fat — traditionally grass-fed butter and MCT oil. The -blending process emulsifies the fats into the coffee, producing a smooth, -creamy, latte-like drink with no added sugar and close to zero carbohydrates. - -The primary benefits for a keto dieter: - -- **Sustained energy** — fat is metabolised slowly, avoiding the spike-and-crash - of sugary drinks. -- **Appetite suppression** — high fat content promotes satiety and reduces the - urge to snack. -- **Ketosis support** — MCT oil converts rapidly into ketones, directly fuelling - the brain and muscles. -- **Mental clarity** — many practitioners report improved focus, attributed to - stable blood glucose and ketone availability. - ---- - -## Classic Bulletproof Coffee - -### Ingredients (serves 1) - -- 240 ml (8 oz) freshly brewed hot coffee (dark roast recommended) -- 1–2 tbsp unsalted grass-fed butter or ghee -- 1 tbsp MCT oil (or coconut oil as an alternative) -- Pinch of sea salt _(optional — enhances flavour and adds electrolytes)_ - -### Method - -1. Brew your coffee using any method (French press, pour-over, espresso + hot - water). -2. Add the hot coffee, butter, and MCT oil to a blender. -3. Blend on high for 20–30 seconds until frothy and creamy. -4. Pour into a mug and drink immediately. - -> **Important:** Use a blender, not a spoon — fat and water will not combine -> without mechanical emulsification. A milk frother works as a quick -> alternative. - -## Key Ingredients & Why They Work on Keto - -| Ingredient | Keto Role | Notes | -| ------------------- | ----------------------- | ---------------------------------------------------------------- | -| MCT oil | Rapid ketone production | Start with 1 tsp if new to MCT oil to avoid digestive discomfort | -| Grass-fed butter | Saturated fat, butyrate | Kerrygold is a widely available option | -| Ghee | Dairy-free fat source | Same as butter but with milk solids removed | -| Coconut cream | Dairy-free fat + MCTs | Use full-fat canned, not refrigerated carton | -| Cardamom | Flavour, no carbs | ~0.4g net carbs per ¼ tsp — negligible | -| Stevia / monk fruit | Zero-carb sweetener | Avoid maltodextrin-based sweetener blends | - ---- - -## Tips for Best Results - -- **Always blend** — stirring fat into coffee produces a greasy, separated - drink. A blender or frother is essential. -- **Start with less MCT oil** — 1 tsp is enough to start; increase gradually - over a week to let your gut adapt. -- **Use grass-fed butter** — higher in omega-3s and conjugated linoleic acid - (CLA) compared to standard butter. -- **Drink in the morning** — bulletproof coffee is best used as a breakfast - replacement, not alongside a full meal, to avoid excessive calorie intake. -- **Cardamom pods vs ground** — whole pods steeped in the brew give a more - delicate flavour; ground cardamom blended in gives a bolder, more integrated - spice hit. diff --git a/food/cardamom-coffee-and-tea.md b/food/cardamom-coffee-and-tea.md @@ -1,96 +0,0 @@ -# Cardamom Coffee & Tea Recipes (Keto-Friendly) - -Cardamom is one of the most aromatic spices in the world, transforming both -coffee and tea with its warm, floral, slightly citrusy flavour. All recipes -below are sugar-free and use coconut milk or cream in place of dairy milk, -making them suitable for a ketogenic diet. - ---- - -## Cardamom Tea - -### Ingredients (serves 2) - -- 1.5 cups water -- 1 cup full-fat coconut milk (from a can) or coconut cream -- 2–3 green cardamom pods, lightly crushed -- 2 tsp loose-leaf black tea (or 2 tea bags) -- Stevia or erythritol to taste _(optional — the coconut milk adds natural - sweetness)_ - -_Optional: a small piece of fresh ginger, a cinnamon stick, or a whole clove_ - -### Method - -1. Lightly crush the cardamom pods with the back of a spoon or a mortar and - pestle. -2. Bring the water to a boil in a small saucepan. -3. Add the crushed cardamom and tea; boil for 2–3 minutes. -4. Pour in the coconut milk, lower the heat, and simmer for 4–5 minutes. -5. Strain into two mugs. Sweeten with stevia or erythritol if desired. - -### Tips - -- Full-fat canned coconut milk gives the creamiest result; avoid "lite" versions - on keto. -- Coconut cream (thicker than coconut milk) makes an even richer, more indulgent - cup. -- For a no-milk version, steep the cardamom and tea in 2 cups of water. -- No pods? Use ½ tsp ground cardamom instead. - ---- - -## Cardamom Coffee - -### The Easiest Method (Any Brewer) - -Add **¼ tsp ground cardamom per cup** directly into your coffee grounds before -brewing. Use your French press, drip machine, or pour-over as normal. No -sweetener needed — cardamom softens the bitterness naturally. - ---- - -### French Press (Whole Pods) - -**Ingredients** - -- ¼ cup coffee beans -- 1 tbsp whole cardamom pods - -**Method** - -1. Grind the coffee beans and cardamom pods together. -2. Add to your French press and pour over hot water. -3. Steep for 4 minutes, plunge, and serve black or with a splash of coconut - cream. - ---- - -### Cardamom Coconut Latte - -**Ingredients (serves 1)** - -- 2 shots espresso (or ½ cup strong coffee) -- ¾ cup full-fat coconut milk or coconut cream -- ½ tsp ground cardamom -- A few drops of liquid stevia _(optional)_ - -**Method** - -1. Brew your espresso. -2. Warm the coconut milk with the cardamom until steamy — do not boil. -3. Froth with a hand frother (coconut cream froths beautifully). -4. Pour over the espresso and add stevia if desired. - ---- - -## Notes - -- Cardamom pairs best with **dark roast** coffee, where its floral notes balance - the bitterness. -- Green cardamom is preferred for drinks; black cardamom has a smokier flavour - better suited for savoury cooking. -- Store ground cardamom in an airtight container away from light — it loses - potency quickly. -- Full-fat canned coconut milk (not the refrigerated carton variety) is the best - keto-friendly dairy substitute here. diff --git a/food/steamed-white-clams.md b/food/steamed-white-clams.md @@ -1,31 +0,0 @@ -# Steamed White Clams - -A simple, flavourful steamed white clam recipe ready in ~30 minutes. - -## Ingredients (serves 2) - -- 1 kg fresh white clams, scrubbed and rinsed -- 2–3 tbsp olive oil or 2 tbsp butter -- 3–4 cloves garlic, finely chopped -- Small pinch chili flakes (optional) -- 120 ml dry white wine or water -- Salt and black pepper to taste -- Lemon wedges and chopped parsley (optional) - -## Instructions - -1. Soak clams in cold salted water for 20–30 minutes, then rinse well. -2. Discard any clams with broken shells or that stay open when tapped. -3. Heat oil or butter in a large pot or deep pan over medium heat. -4. Add garlic (and chili if using), cook 1–2 minutes until fragrant but not browned. -5. Pour in white wine or water, bring just to a boil. -6. Add clams, stir once, cover with a lid, and cook 5–8 minutes until most clams open, shaking the pan occasionally. -7. Discard any clams that did not open. -8. Season with salt and pepper, squeeze lemon over, and garnish with parsley. Serve with crusty bread. - -## Tips - -- Use only water and lemon instead of wine for an alcohol-free version. -- Add a chopped shallot or onion with the garlic for extra sweetness. -- The broth is excellent for dipping bread — don't waste it. -- Clams cook fast; don't overcook or they turn rubbery. diff --git a/food/white-clam-soup.md b/food/white-clam-soup.md @@ -1,41 +0,0 @@ -# Simple White Clam Soup - -A simple, delicious white clam soup (inspired by the Italian *Zuppa di Clams Bianco* style) that comes together in under 30 minutes. - ---- - -## Ingredients (Serves 2–3) - -- 1 kg (2 lb) small fresh clams, scrubbed and purged -- 4 tbsp olive oil -- 1 small onion, finely chopped -- 4–6 cloves garlic, thinly sliced -- 1 cup dry white wine -- 1–2 cups clam juice, fish stock, or water -- ½ tsp black pepper -- ½ tsp dried oregano -- Salt to taste -- 2 tbsp fresh parsley, chopped - ---- - -## Instructions - -1. **Purge the clams** — soak them in cold salted water for 20–30 minutes to release sand, then scrub and rinse well. -2. **Sauté aromatics** — heat olive oil in a large pot over medium heat. Add the onion and cook for about 8 minutes until soft. Add garlic and cook 1 more minute. -3. **Build the broth** — pour in the white wine and clam juice/stock. Bring to a simmer and cook for 5 minutes to let the flavors meld. -4. **Cook the clams** — add the clams, black pepper, and oregano. Cover and simmer for 6–8 minutes until the clams open. -5. **Finish and serve** — discard any clams that didn't open. Taste and adjust salt (the clam liquid is naturally salty). Serve immediately topped with fresh parsley. - ---- - -## Tips for Success - -- **Don't skip purging** — soaking clams in flour-water for 20 minutes is a great trick to draw out extra sand. -- **Use ginger for a lighter version** — if you prefer an Asian-style broth, swap the wine and oregano for fresh ginger slices and a splash of fish sauce for a clean, ocean-fresh flavor. -- **Serve with crusty bread** — the broth is incredibly flavorful and perfect for dunking. -- **Discard unopened clams** — any clam that remains closed after cooking should always be discarded for safety. - ---- - -> Ready in about **25 minutes**. Pairs beautifully with toasted sourdough or a simple green salad.