Skip to content

Instantly share code, notes, and snippets.

View peterwwillis's full-sized avatar

Peter W peterwwillis

View GitHub Profile
@peterwwillis
peterwwillis / gist:2bcad0874414e704af31e227b6061189
Last active February 22, 2026 02:21
Setting up 1Password & GitHub for commit signing

Setting up 1Password & GitHub for commit signing

1. Prerequisites

  1. Install/Update 1Password desktop app.
  2. Enable the 1Password SSH Agent in Settings > Developer > SSH Agent.
  3. Update Git to version 2.34.0 or later.

2. Enable the 1Password SSH Agent

Tools

AI Agents

Gemini CLI

Only "Bob" knows why, but in Linux you have to type Ctrl+J to add new lines to your prompt.

Web Browser

@peterwwillis
peterwwillis / readme.md
Created February 6, 2026 02:29
Use Ollama running on host OS within a VM and Docker-in-Docker

Accessing Ollama running on host OS from inside Docker-in-docker container in VM

If you run Ollama on your host OS, but want to access it from within a protected container:

  1. Install Colima and Docker-in-Docker (link)
  2. Install Ollama on host (link)
  3. Access Ollama from the container with URL: http://host.docker.internal:11434
@peterwwillis
peterwwillis / readme.md
Last active February 7, 2026 00:57
Installing Ollama and OpenWebUI on Ubuntu 24.04

Installing Ollama and OpenWebUI on Ubuntu 24.04

Notes

@peterwwillis
peterwwillis / gist:e2b37e5dd502fd7ffc3833f56feade1e
Last active February 21, 2026 07:56
Installing and running Docker-in-Docker in a dedicated Colima VM on Ubuntu Linux 24.04, for AI agent work

Installing and running Docker-in-Docker in a dedicated Colima VM, for AI agent work

Colima creates a VM and sets up Docker inside it. This is a good command-line replacement for Docker Desktop.

Colima will keep persistent files in a different volume than the VM's root disk, so you can delete and recreate the root disk and your files are still there. This makes recovering from AI 'incidents' easy.

You can have multiple Docker contexts, one for "safe" work (in one VM), and one for "dangerous" AI work (different VM). The only real downside is a VM volume filling up with container images.

Your containers can access the local host's ports using hostname host.docker.internal.

@peterwwillis
peterwwillis / gist:3248bcd37bb9080ef35b5a83f2f324d3
Last active February 8, 2026 22:45
ThinkPad T14s Gen 4 - Linux tweaks

Setting up ThinkPad T14s Gen4 for Ubuntu Linux 24.04

About

I finally settled on a new personal Linux laptop, and it's the Lenovo ThinkPad T14s Gen 4 w/AMD processor, 32GB RAM, and Low-power 500 nits display.

I had mine shipped with Ubuntu, it comes with (I think) Ubuntu 22.04.01 LTS. It's nice because they set up the BIOS to come with Secure Boot enabled for Ubuntu. Everything works out of the box.

@peterwwillis
peterwwillis / control-touchscreen.sh
Created November 8, 2024 04:00
Detect, enable, or disable a HID touchscreen device in Linux (compatible w/Wayland)
#!/usr/bin/env sh
# control-touchscreen.sh - script to control touchscreen device in Linux
# Copyright (C) 2024 Peter Willis
#
# This script is designed to try to detect a Touchscreen device in Linux.
# If it detects one, it allows you to bind or unbind it to the HID Generic
# driver, which should enable or disable the touchscreen.
# Works on Wayland, should work on X11 as well (but untested).
#
# SOFTWARE LICENSE:
@peterwwillis
peterwwillis / k8s_debugging_tips.md
Last active March 27, 2024 14:53
Kubernetes debugging tips

Log Files

Nodes

Control Plane log files

  • /var/log/kube-apiserver.log - API Server, responsible for serving the API
  • /var/log/kube-scheduler.log - Scheduler, responsible for making scheduling decisions
  • /var/log/kube-controller-manager.log - a component that runs most Kubernetes built-in controllers, with the notable exception of scheduling (the kube-scheduler handles scheduling).

Worker Node log files

@peterwwillis
peterwwillis / .gitconfig
Created January 9, 2024 08:13
Running 1Password Desktop with Docker on Alpine Linux
[user]
; NOTE: Replace your name, email, and signing ssh public key here.
name = My Git User Name Here
email = MYGITEMAIL@ADDRESS.HERE
signingkey = MYLONGSSHPUBKEYHERE
; NOTE: Uncomment this if you want to set a default credential store for Git.
; On Linux, "secretservice" is the libsecret (aka keyring) method.
;[credential]
; credentialStore = secretservice