Skip to content

Instantly share code, notes, and snippets.

View daveio's full-sized avatar

Dave Williams daveio

View GitHub Profile
@daveio
daveio / settings.json
Created May 7, 2025 13:35
Zed config (~/.config/zed/settings.json)
{
"active_pane_magnification": 1.2,
"assistant": {
"default_height": 500,
"default_model": {
"model": "claude-3-7-sonnet-thinking-latest",
"provider": "zed.dev"
},
"default_width": 500,
"dock": "left",
@daveio
daveio / init.lua
Created May 7, 2025 03:04
Neovim config (~/.config/nvim/init.lua)
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
@daveio
daveio / _README.md
Last active May 1, 2025 14:37
My fish functions, sanitised for public sharing

funcs.public.fish

My fish functions, sanitised for public sharing.

Maybe of use to someone.

yank-all and mw are particularly likely to be helpful to others.

@daveio
daveio / AI prompt for Cloudflare Workers (MDC for Cursor).md
Created April 29, 2025 23:48
The code snippet is an advanced assistant specialized in generating Cloudflare Workers code. It includes best practices, configuration requirements, and code examples to help you build efficiently secure/scalable applications on the Cloudflare platform by default unless JavaScript is specifically requested

AI prompt for Cloudflare Workers (MDC for Cursor)

Preview:
---
description: You are an advanced assistant specialized in generating Cloudflare Workers code. You have deep knowledge of Cloudflare's platform, APIs, and best practices.
globs:
alwaysApply: true
---
# Cloudflare Workers Development Guide
const detectKeyType = (key: string): KeyType => {
if (!key.trim()) return null;
if (
key.includes("-----BEGIN PRIVATE KEY-----") ||
key.includes("-----BEGIN RSA PRIVATE KEY-----") ||
key.includes("-----BEGIN EC PRIVATE KEY-----")
) {
return "PKCS#8";
} else if (key.includes("-----BEGIN OPENSSH PRIVATE KEY-----")) {
@daveio
daveio / stained-glass.md
Created April 4, 2025 12:50
Stained Glass Window

Thanks! I’ll look into the meaning or origin of the symbol in this stained glass window, which features geometric shapes in blue and yellow and is installed in a residential property. I’ll explore whether it has historical, cultural, architectural, or symbolic significance.

I’ll get back to you shortly with what I find.

Meaning and Origin of a Geometric Stained Glass Symbol

Description of the Design

The stained glass pattern is composed of bold geometric shapes in textured blue and yellow glass. It features a large yellow triangular form at the bottom, a smaller blue triangle pointing downward in the center, and a yellow “drop”-shaped piece at the top. All the pieces are outlined in dark lead came (the black lines). The design is strikingly simple and symmetric along a vertical axis, giving the impression of an abstract emblem or icon.

Architectural Context: Decorative Leaded Glass

@daveio
daveio / ruby_idioms.rb
Created April 4, 2025 09:55
Claude AI adding comments to a file
#!/usr/bin/env ruby
class Person
attr_accessor :name, :age
def initialize(name, age)
@name = name
@age = age
end
@daveio
daveio / shadcn-monokai.css
Created March 21, 2025 21:46
shadcn monokai theme
@layer base {
:root {
--background: 233 18% 19%;
--foreground: 173 24% 93%;
--muted: 233 12% 23%;
--muted-foreground: 233 12% 73%;
--popover: 233 18% 16%;
--popover-foreground: 0 0% 100%;
--card: 233 18% 17%;
--card-foreground: 173 24% 98%;
@daveio
daveio / github-gar.fish
Last active March 18, 2025 14:28
Set up GitHub and GCP Artifact Registry
# BEGIN INFORMATION
# DEPENDENCIES:
#
# `fish` - This uses `fish` syntax. It will not work under `bash` or `zsh`. Feel free to port it.
# `gh` - GitHub CLI. Make sure this is installed and logged in.
# `gcloud` - Google Cloud CLI. Make sure this is installed and logged in.
#
# INSTRUCTIONS:
#
@daveio
daveio / mise.toml
Created March 17, 2025 14:04
Mise config
[env]
EDITOR = 'code --wait'
MISE_ACTIVE = 'true'
[settings]
all_compile = true
asdf_compat = true
auto_install = true
color = true
env_file = '.env'