Skip to content

Instantly share code, notes, and snippets.

View afbjorklund's full-sized avatar

Anders Björklund afbjorklund

  • Göteborg, Sweden
View GitHub Profile
@afbjorklund
afbjorklund / codapi.html
Created April 19, 2026 18:19
Example of lima-codapi interaction
<html>
<head>
<link rel="stylesheet" href="https://unpkg.com/@antonz/[email protected]/dist/snippet.css" />
</head>
<body>
<h1>codapi-lima</h1>
<p>This code will run in the "codapi" lima instance (see `limactl list codapi`):</p>
<pre><code>
@afbjorklund
afbjorklund / README.md
Last active April 17, 2026 16:24
zero-install feed for lima

0install

Added a zero-install feed for limactl

0install run limactl.xml

See limactl.xml for the version details etc.

@afbjorklund
afbjorklund / Dockerfile
Last active September 30, 2025 16:37
apple container with docker
FROM ubuntu
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://get.docker.com | sh
RUN apt-get update && apt-get install -y --no-install-recommends procps && rm -rf /var/lib/apt/lists/*
RUN ( echo "net.ipv6.conf.all.disable_ipv6=1"; echo "net.ipv6.conf.default.disable_ipv6=1" ) | tee /etc/sysctl.d/container.conf
RUN apt-get update && apt-get install -y --no-install-recommends iptables && rm -rf /var/lib/apt/lists/*
RUN update-alternatives --set iptables /usr/sbin/iptables-legacy && update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
@afbjorklund
afbjorklund / default.hjson
Created July 30, 2025 08:18
default.yaml converted to default.hjson
{
additionalDisks: null
arch: null
audio:
{
device: null
}
caCerts:
{
certs: null
@afbjorklund
afbjorklund / Dockerfile
Created July 8, 2025 16:23
apple container with kubernetes
FROM debian:testing AS build
# log_proxy
RUN apt-get update
RUN apt-get install -y --no-install-recommends build-essential
RUN apt-get install -y pkg-config libglib2.0-dev
RUN apt-get install -y wget openssl ca-certificates
RUN wget --content-disposition https://github.com/metwork-framework/log_proxy/archive/refs/tags/v0.7.4.tar.gz \
&& tar xzf log_proxy-0.7.4.tar.gz && cd log_proxy-0.7.4 && make install STATIC=yes
@afbjorklund
afbjorklund / Dockerfile
Created June 30, 2025 16:21
apple container with containerd
FROM debian:testing AS build
# log_proxy
RUN apt-get update
RUN apt-get install -y --no-install-recommends build-essential
RUN apt-get install -y pkg-config libglib2.0-dev
RUN apt-get install -y wget openssl ca-certificates
RUN wget --content-disposition https://github.com/metwork-framework/log_proxy/archive/refs/tags/v0.7.4.tar.gz \
&& tar xzf log_proxy-0.7.4.tar.gz && cd log_proxy-0.7.4 && make install STATIC=yes
@afbjorklund
afbjorklund / oras-gateway.py
Created February 6, 2025 17:30
simple curl proxy for oras artifacts
#!/usr/bin/env python3
# simple proxy for oras artifacts
import http.server
import oras.client
import argparse
from urllib.parse import urlparse
import base64
from collections import namedtuple
@afbjorklund
afbjorklund / lima.yaml
Last active June 3, 2024 13:42
lima.yaml for kubernetes 10 year celebration (ubuntu 15.04)
# This template requires Lima v0.7.0 or later.
arch: "x86_64"
images:
- location: "http://cloud-images-archive.ubuntu.com/releases/vivid/release-20160203/ubuntu-15.04-server-cloudimg-amd64-disk1.img"
arch: "x86_64"
digest: "sha256:a348500d04de3352af3944e9dae99a08d60091221e1370941b93bd7a27971568"
firmware:
legacyBIOS: true
mounts: []
.vagrant
#!/bin/sh
# Wrapper for using kubectl as "ssh", for rsync and git
# - setting either $RSYNC_RSH or $GIT_SSH env variables
namespace=''
pod=$1
shift
# POD[@NAMESPACE]:DEST
if [ "X$pod" = "X-l" ]; then
pod=$1