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
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>com.apple.developer.icloud-container-identifiers</key> | |
| <array> | |
| <string>iCloud.is.workflow.my.workflows</string> | |
| </array> | |
| <key>get-task-allow</key> |
| on run {input, parameters} | |
| set delimitedList to paragraphs of (input as string) | |
| tell application "Things3" | |
| repeat with currentTodo in reverse of delimitedList | |
| set newToDo to make new to do with properties {name:currentTodo} at beginning of list "Inbox" | |
| end repeat | |
| end tell | |
| end run |
| # HTTP Requests | |
| Drafts 5 scripting is going to be on a whole different level. Can't wait to get this polished up and ready to ship! |
| library(magrittr) | |
| library(magick) | |
| image_read("logo:") %>% | |
| image_convert('png', colorspace = 'gray') %>% | |
| image_edge(radius = 1) %>% | |
| image_negate() %>% | |
| image_transparent('white', 10000) %>% | |
| image_background("white") %>% | |
| image_browse() |
| do shell script "pmset -g batt | grep InternalBattery | column -t" | |
| set x to the result | |
| set state to word 7 of x | |
| set remaining to the word 10 of x | |
| if state is "discharging" then | |
| return 1 | |
| else | |
| return 2 | |
| end if |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" /> | |
| <title>Check AirPod availability in Apple Stores</title> | |
| <style> | |
| body { | |
| font-size: 12px; |
| import UIKit | |
| import PlaygroundSupport | |
| let vc = UIViewController() | |
| vc.view.backgroundColor = .white | |
| PlaygroundPage.current.liveView = vc | |
| PlaygroundPage.current.needsIndefiniteExecution = true | |
| let button = UIButton(type: .system) | |
| button.frame = CGRect(x: 0, y: 0, width: 240, height: 120) |
| #!/usr/bin/env ruby | |
| require 'csv' | |
| # md - Tables - Create from CSV | |
| # v1.1 2016-08-17 | |
| # From the Markdown Service Tools <http://brettterpstra.com/projects/markdown-service-tools/> | |
| # Converts CSV style input to MultiMarkdown tables | |
| # Changelog | |
| # 1.1: Fixed error when line ended with whitespace in middle of input |