Skip to content

Instantly share code, notes, and snippets.

View bkono's full-sized avatar

Bryan Konowitz bkono

View GitHub Profile
@bkono
bkono / AGENTS.md
Created January 13, 2026 04:14 — forked from joelhooks/AGENTS.md
my opencode global AGENTS prompt

Who You're Working With

Joel Hooks - co-founder of egghead.io, education at Vercel, builds badass courses via Skill Recordings (Total TypeScript, Pro Tailwind). Deep background in bootstrapping, systems thinking, and developer education. Lives in the Next.js/React ecosystem daily - RSC, server components, suspense, streaming, caching. Skip the tutorials.

<tool_preferences>

always use beads bd for planning and task management

Reach for tools in this order:

  1. Read/Edit - direct file operations over bash cat/sed
  2. ast-grep - structural code search over regex grep
@bkono
bkono / smart-handoff.md
Created August 28, 2025 06:23 — forked from skinnyandbald/smart-handoff.md
[claude code] smart-handoff command
description
Save your current flow, decisions, and next steps for seamless context handoff

Smart Handoff

Analyze our entire conversation and prepare for a context handoff. I need you to:

  1. Generate a comprehensive working context file by analyzing what we've been working on
  2. Suggest the best compact command based on what you found
defmodule MyApp.YugoSupervisor do
use Supervisor
require Logger
def start_link(init_arg) do
Supervisor.start_link(__MODULE__, init_arg, name: __MODULE__)
end
@impl true
def init(_init_arg) do
@bkono
bkono / gen.lua
Last active May 31, 2024 03:45
gen.nvim update to support multiple providers, including openai and groq
local get_api_key = function(path)
local expanded_path = vim.fn.expand(path)
local file = io.open(expanded_path, "r")
if file then
local content = file:read("*all"):gsub("\n", "")
file:close()
return content
else
error("Could not open file!")
end
@bkono
bkono / multitool.go
Last active April 24, 2024 17:53
Simple update to the go-openai completion-with-tools example for Groq and Mixtral
// Beefed up version that includes multiple tools and a verbose flag for printing the dialogue along the way.
package main
import (
"context"
"encoding/json"
"flag"
"fmt"
"math"
"math/rand"
@bkono
bkono / router.go
Last active February 28, 2024 22:50
Custom NotFound and Middleware with new golang 1.22 http router
package main
import (
"fmt"
"log/slog"
"net/http"
"slices"
)
type (
@bkono
bkono / SingleTableAppSync.md
Created December 16, 2022 22:29 — forked from dabit3/SingleTableAppSync.md
GraphQL Single Table Design with DynamoDB and AWS AppSync

GraphQL

GraphQL Schema

type Customer {
  id: ID!
  email: String!
}
@bkono
bkono / action.js
Created November 21, 2022 04:06
Pipedream action for creating a draft in Typefully. Supports unscheduled and next-free-slot.
import axios from "axios";
export default {
name: "Typefully Create Draft",
description:
"Create a draft in Typefully. Supports unscheduled draft, or adding to next available slot.",
key: "typefully_create_draft",
version: "1.0.0",
type: "action",
props: {
@bkono
bkono / f.fish
Last active May 26, 2022 22:17
Some useful FZF fish funcs
function f -d "Fuzzy-find and open a file in current directory"
set file (fzf --height 40% --info inline --border --reverse --preview 'bat {}')
if test -n "$file"
nvim $file
end
end
@bkono
bkono / ptr.go
Last active January 17, 2024 00:58
A decent use of generics, safe derefence
// Package ptr implements a simple pointer instrumentation.
// As it is based on Go generics, the minimal Go version is 1.18.
// Credit to https://github.com/candiduslynx/ptr/ and https://gist.github.com/bkono/8f832566e6c2875d7cede15e46aa9d58
package ptr
// Deref will deref the pointer if it can, otherwise it will return either a fallback if provided, or a default value for T
func Deref[T any](pointer *T, fallback ...T) T {
if pointer != nil {
return *pointer
}