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
| Begin by enclosing all thoughts within <thinking> tags, exploring multiple angles and approaches. | |
| Break down the solution into clear steps within <step> tags. Start with a 20-step budget, requesting more for complex problems if needed. | |
| Use <count> tags after each step to show the remaining budget. Stop when reaching 0. | |
| Continuously adjust your reasoning based on intermediate results and reflections, adapting your strategy as you progress. | |
| Regularly evaluate progress using <reflection> tags. Be critical and honest about your reasoning process. | |
| Assign a quality score between 0.0 and 1.0 using <reward> tags after each reflection. Use this to guide your approach: | |
| 0.8+: Continue current approach | |
| 0.5-0.7: Consider minor adjustments | |
| Below 0.5: Seriously consider backtracking and trying a different approach |
Apple restricted the access to Xcode LLM (Predictive code completion) feature on China models of Mac. This guide provides a way to bypass that restriction. It's verified on macOS 15.0 Beta (24A5264n), but there is no guarentee that it will always work on later macOS versions.
csrutil enable --without debug command in recovery mode).| local _M = { | |
| scratchpad = {} | |
| } | |
| local yabai = string.gsub(hs.execute("which yabai", true), "%s+", "") | |
| _M.init = function() | |
| local output, status = _M.exec("query --windows") | |
| if not status then return end |
| // Allows disabling Same-Origin Policy on iOS WKWebView. | |
| // Tested on iOS 12.4. | |
| // Uses private API; obviously can't be used on app store. | |
| @import WebKit; | |
| @import ObjectiveC; | |
| void WKPreferencesSetWebSecurityEnabled(id, bool); | |
| @interface WDBFakeWebKitPointer: NSObject |
| #!/usr/bin/env python | |
| import argparse | |
| import subprocess | |
| import plistlib | |
| import os | |
| import xml.etree.ElementTree as ET | |
| TEAM = '___YOUR_TEAM_ID__' |
The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "lldb", | |
| "name": "LLDB", | |
| "cwd" : "${workspaceFolder}", |
| app_name | bundle_id | sdk | deployment_target | uses_swift | percentage_swift | main_binary_uses_swift | is_game | executable | |
|---|---|---|---|---|---|---|---|---|---|
| 30 Day Fitness | com.vigorapps.30DayFitness | iphoneos12.0 | 10 | TRUE | 31% | TRUE | FALSE | ThirtyDaysFitness | |
| 8 Ball Pool | com.miniclip.8ballpoolmult | iphoneos11.3 | 8 | FALSE | 0% | FALSE | TRUE | pool | |
| Amazon | com.amazon.Amazon | iphoneos11.4 | 9 | FALSE | 0% | FALSE | FALSE | Amazon | |
| Amazon Alexa | com.amazon.echo | iphoneos11.2 | 10 | TRUE | 28% | TRUE | FALSE | AlexaMobileiOS-prod | |
| Astro Palmistry & Horoscope | com.gfb.horoscope | iphoneos12.1 | 8 | FALSE | 0% | FALSE | FALSE | horoscope | |
| Ball Blast | com.nomonkeys.ball-blast | iphoneos12.1 | 9 | FALSE | 0% | FALSE | TRUE | ball-blast | |
| BetterMen | com.betterme.bettermen | iphoneos12.0 | 10 | TRUE | 74% | TRUE | FALSE | BetterMen | |
| BitLife | com.wtfapps.apollo16 | iphoneos12.1 | 8 | FALSE | 0% | FALSE | TRUE | Apollo16 | |
| Bitmoji | com.bitstrips.imoji | iphoneos11.4 | 10 | TRUE | 20% | TRUE | FALSE | imoji |
| #import "fishhook.h" // from https://github.com/facebook/fishhook | |
| // Replace write and writev, the two "chokepoint" functions that writes to stderr and stdout will probably pass through | |
| static int (*originalWritev)(int fd, const struct iovec *v, int n); | |
| static int (*originalWrite)(int fd, const void *buf, size_t size); | |
| void checkForBadConstraintsMessage(int fd, const char *string, size_t size) { | |
| if (strnstr(string, "UIViewAlertForUnsatisfiableConstraints", size)) { | |
| // Write it to the console anyways before crashing | |
| originalWrite(fd, string, size); |