Installing docker via snap on Ubuntu gets permission denied unix:///var/run/docker.sock error

If you follow a ‘normal’ install of docker via the install guide, you add yourself to the docker group to get permissions as a normal user to run the docker commands. If you install on Ubuntu with snap however, you still get error:

permission denied while trying to connect to the docker API at unix:///var/run/docker.sock

Per this post, you need to run this to give yourself permissions:

sudo setfacl --modify user:[your-user-id]:rw /var/run/docker.sock

Ollama: Increase context for a model to use with Opencode

by default, ollama sets a very low context size with any model it launches. To change this, set the num_ctx parameter on a model and save it as a new model:

ollama run modelname:12b

/set parameter num_ctx 32768

/save modelname:12b-32k

Update .ollama/config.json to include the new model.

Start new model with ‘ollama launch opencode’ pick newly configured model from the list

You get what you measure – be careful what you incentivise

I worked on a project where there was a ‘bug bounty’ with prizes for fixing the most bugs in a month. The developer that won in the first month fixed an incredible number of bugs compared to all other developers and won an iPod. How did he fix more than everyone else? He searched far back in the backlog and picked up and fixed all the simplest/easiest/quickest to fix bugs. A lot of those issues resolved were trivial ‘nice to haves’ that didn’t add any substantial value.

Be careful what you measure because by incentivising something that’s what you’ll end up with, whether that’s really what you were aiming to achieve or not.

Running local LLMs: ollama + opencode with gemma4:e2b

Assuming you have ollama installed and a local model already downloaded, install opencode following steps here.

Create an opencode.json with config pointing to your downloaded model:

{
"$schema": "https://opencode.ai/config.json",
"provider": {
"ollama": {
"npm": "@ai-sdk/openai-compatible",
"name": "Ollama",
"options": {
"baseURL": "http://localhost:11434/v1"
},
"models": {
"gemma4": {
"name": "gemma4:e4b"
}
}
}
}
}

Start opencode from ollama with:

ollama launch opencode

Scroll down to other models and select the model you configured above.