The following guide will show you how to connect a local model served with MLX to OpenCode for local coding.
1. Install OpenCode
curl -fsSL https://opencode.ai/install | bash
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
| #!/usr/bin/env bash | |
| # listgitfiles.sh | |
| # List raw GitHub URLs for files in a repo or subfolder, filtered by extensions. | |
| # Full README is embedded and printed only with: listgitfiles.sh -h|--help | |
| set -euo pipefail | |
| # ------------------------- Minimal Help (usage) ------------------------- | |
| print_min_help() { | |
| cat <<'USAGE' |
| // Update globs depending on your framework | |
| --- | |
| name: tailwind_v4 | |
| description: Guide for using Tailwind CSS v4 instead of v3.x | |
| globs: ["**/*.{js,ts,jsx,tsx,mdx,css}"] | |
| tags: | |
| - tailwind | |
| - css | |
| --- |
| <Overview> | |
| BAML (Basically, A Made-Up Language) is a domain-specific language for building LLM prompts as functions. | |
| You can build an agentic workflow with BAML. | |
| </Overview> | |
| <Schema> | |
| // Define output schemas using classes | |
| class MyObject { | |
| // Optional string fields use ? | |
| // @description is optional, but if you include it, it goes after the field. |
The problem with Arc is that it doesn't allow exporting data (history, bookmarks) to a file natively.
One way to do this is to use a script but that only exports Bookmarks and not the history.
I don't really use the bookmarks feature that much; what I really liked about Arc was that it was really easy to navigate to somewhere I already visited.
So, if you're like me, follow this guide and you'll be able to import your browsing history into Zen browser!
This guide explains how to override peer dependencies in a PNPM monorepo by using a custom hook. It provides a step-by-step solution to ensure consistent versioning across packages that rely on different versions of the same dependency.
When working with a monorepo a challenges arises if you need to use multiple versions of the same package.
Nominally, this can be solved through package aliases and overides. However, a particularly sticky situation is when downstream packages rely peer dependencies of uptstream packages you need two or more versions of.
| #!/usr/bin/env sh | |
| # LATEST VERSION OF THIS SCRIPT: https://gist.github.com/swayducky/8ba8f2db156c7f445d562cdc12c0ddb4 | |
| # FORKED FROM: https://gist.github.com/ddwang/0046da801bcb29d241869d37ad719394 | |
| # 1) No longer has a hard-coded COMMIT | |
| # 2) Auto-symlinks a "code" script to avoid wslCode.sh breaking | |
| # HOW TO INSTALL: | |
| # 1) Remove "c:\Users\<USER_NAME>\AppData\Local\Programs\cursor\resources\app\bin" from Windows Environment Settings | |
| # 2) Modify this script with your Windows <USER_NAME> (NOT your WSL username) in the VSCODE_PATH variable |
This Gist contains a sample query for searching text content in GROQ, Sanity's custom query language. We use something similar to this for Causal's documentation site. See more on our blog!
| #!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')" | |
| # syntax = docker/dockerfile:1.4.0 | |
| FROM node:20 | |
| WORKDIR /root | |
| RUN npm install sqlite3 |