- Prereqs
- Tidewave gem already mounted (e.g.,
/tidewave/mcp on http://localhost:3100). - Rails server running locally on that port (
bin/rails s -p 3100or equivalent).
- Tidewave gem already mounted (e.g.,
- Install the shim globally
- Copy
tidewave_mcp_stdio_proxy.rbinto~/bin/tidewave-mcp-cli-bridge(or any directory on your$PATH). - Make it executable:
chmod +x ~/bin/tidewave-mcp-cli-bridge. - (Optional) If you need request logging, export
TIDEWAVE_MCP_PROXY_LOG=/path/to/logfile.log. Leave it unset or set to off to disable logging.
- Copy
- Configure Codex
- Edit
~/.codex/config.tomland add:
- Edit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule Cube.RegEx do | |
| @regex_game_number ~r/Game (\d+)/ | |
| @regex_color_thresholds ~r/(1[3-9]|[2-9][0-9]) red|(1[4-9]|[2-9][0-9]) green|(1[5-9]|[2-9][0-9]) blue/ | |
| @spec count(binary()) :: any() | |
| def count(filename) do | |
| File.read!(Path.expand(filename)) | |
| |> String.split("\n", trim: true) | |
| |> Enum.reject(&match_color_thresholds?/1) | |
| |> Enum.reduce(0, &sum_game_numbers/2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule AdventOfCode23.Dec01.V2 do | |
| @number_map %{ | |
| "zero" => 0, | |
| "one" => 1, | |
| "two" => 2, | |
| "three" => 3, | |
| "four" => 4, | |
| "five" => 5, | |
| "six" => 6, | |
| "seven" => 7, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {:ok, spi_ref} = Circuits.SPI.open("spidev0.0", speed_hz: 9_000_000) | |
| off = <<0x72>> <> (<<0::8, 0::8, 0::8>> |> :binary.copy(16 * 16)) | |
| red = <<0x72>> <> (<<255::8, 0::8, 0::8>> |> :binary.copy(16 * 16)) | |
| green = <<0x72>> <> (<<0::8, 255::8, 0::8>> |> :binary.copy(16 * 16)) | |
| blue = <<0x72>> <> (<<0::8, 0::8, 255::8>> |> :binary.copy(16 * 16)) | |
| white = <<0x72>> <> (<<255::8, 255::8, 255::8>> |> :binary.copy(16 * 16)) | |
| Circuits.SPI.transfer(spi_ref, red) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule SieveOfEratosthenes do | |
| @doc """ | |
| https://www.baeldung.com/cs/prime-number-algorithms | |
| Naive implementation of the Sieve Of Eratosthenes for finding primes below `number` | |
| """ | |
| @spec primes(number) :: list | |
| def primes(1), do: [] | |
Deep breath...
-
Try Ruby - In-browser Ruby tutorial
-
Learn to Program by Chris Pine - The best first guide to programming I've seen. Good intro to Ruby mechanics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 24 Diner | |
| Arlo | |
| Austin Ale House | |
| Austin Java | |
| Bacon | |
| Bar Chi | |
| Barley Swine | |
| Biscuits and Groovy | |
| Black Sheep Lodge | |
| Black Star Co-op |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Extracted library from a deprecated app | |
| class Token | |
| PREFIXES = ['ab', 'ac', 'acr', 'acl', 'ad', 'adr', 'ah', 'ar', 'aw', 'ay', 'br', 'bl', 'cl', 'cr', 'ch', 'dr', 'dw', 'en', 'ey', 'in', 'im', 'iy', 'oy', 'och', 'on', 'qu', 'sl', 'sh', 'sw', 'tr', 'th', 'thr', 'un', 'st', 'str', 'kn'] | |
| DIPTHONGS = ['ae', 'au', 'ea','ou','ei','ie','ia','ee','oo','eo','io'] | |
| CONSONANT_PAIRS = ['bb', 'bl', 'br', 'ck', 'cr', 'ch', 'dd', 'dr', 'gh', 'gr', 'gn', 'gg', 'lb', 'ld', 'lk', 'lp', 'mb', 'mm', 'nc', 'nch', 'nd', 'ng', 'nn', 'nt', 'pp', 'pl', 'pr', 'rr', 'rch', 'rs', 'rsh', 'rt', 'sh', 'th', 'tt', 'st', 'str'] | |
| POSTFIXES = ['able', 'act', 'am', 'ams', 'ect', 'ed', 'edge', 'en', 'er', 'ful', 'ia', 'ier', 'ies', 'illy', 'im', 'ing', 'ium', 'is', 'less', 'or', 'up', 'ups', 'y', 'igle', 'ogle', 'agle', 'ist', 'est'] | |
| VOWELS = ['a', 'e', 'i', 'o', 'u'] | |
| CONSONANTS = ('a'..'z').to_a - VOWELS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Aggregated music 'Likes' from my Facebook Friends list | |
| require 'koala' | |
| # Visit https://developers.facebook.com/tools/explorer | |
| # and click "Get Access Token", assigning appropriate permissions | |
| @graph = Koala::Facebook::API.new(FACEBOOK_GRAPH_ACCESS_TOKEN) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env ruby | |
| require "rubygems" | |
| require "formatador" | |
| styles = [ | |
| :bold, | |
| :underline, | |
| :blink_slow, | |
| :blink_fast, |
NewerOlder