Skip to content

Instantly share code, notes, and snippets.

Hi @choufeng! Great PR — exactly what we need. We tested it in our environment and applied fixes for all the CodeRabbit review items. Here's a patch you can apply directly:

Apply

curl -L https://gist.github.com/rm-rf-etc/fcdb35b3d0fba3a2e126d75b30c07c4c/raw/opencode-fixes.patch | git apply

Or if you prefer, add our branch as a remote and merge:

@rm-rf-etc
rm-rf-etc / opencode-fixes.patch
Created April 23, 2026 20:35
Archon OpenCode provider: CodeRabbit review fixes for PR coleam00/Archon#1372
diff --git a/packages/providers/src/community/opencode/config.ts b/packages/providers/src/community/opencode/config.ts
index bd25ede..680dc68 100644
--- a/packages/providers/src/community/opencode/config.ts
+++ b/packages/providers/src/community/opencode/config.ts
@@ -28,7 +28,12 @@ export function parseOpencodeConfig(raw: Record<string, unknown>): OpencodeProvi
result.hostname = raw.hostname;
}
- if (typeof raw.port === 'number') {
+ if (
@rm-rf-etc
rm-rf-etc / candlesticks.py
Created April 10, 2022 08:36
Candlestick Charts With Matplotlib
# https://www.statology.org/matplotlib-python-candlestick-chart/
import matplotlib.pyplot as plt
#create figure
plt.figure()
#define width of candlestick elements
width = .4
width2 = .05
@rm-rf-etc
rm-rf-etc / intrinsic_time.py
Last active December 24, 2020 22:59
Intrinsic Time implementation, from the Alpha Engine whitepaper
class IntrinsicTimeBar:
reversal: False
direction: None
time: None
high: None
low: None
def __init__(self, time, high: float, low: float, direction=None, reversal=False):
self.reversal = reversal
self.direction = direction
@rm-rf-etc
rm-rf-etc / ha-candles-backtest.py
Created November 18, 2020 22:14
HA Candles Backtest
import yfinance as yf
import pandas as pd
import numpy as np
import pandas_datareader as pdr
import matplotlib.pyplot as plt
import plotly
import plotly.graph_objects as go
yf.pdr_override()
stock = yf.Ticker("SPY")
@rm-rf-etc
rm-rf-etc / index.ts
Last active March 30, 2020 08:53
Database-to-JSON Adapter
import { sha256 } from "sha.js";
type Data = {
[k: string]: {
[k: string]: string | number | boolean,
}
};
const data: Data = {};
@rm-rf-etc
rm-rf-etc / omit.js
Last active December 26, 2019 07:22
Removes the `_` property from every level of a nest gun.js data node.
import omit from "lodash.omit";
import keys from "lodash.keys";
export default (ref1) => {
if (typeof ref1 !== "object") return ref1;
function stripProp(prop, ref2) {
if (typeof ref2[prop] !== "object") return;
/* eslint-disable-next-line no-param-reassign */
ref2[prop] = omit(ref2[prop], "_");
@rm-rf-etc
rm-rf-etc / includes.js
Last active December 26, 2019 06:38
Basics of using ES Modules
export const add = (a, b) => a + b;
export const subtract = (a, b) => a - b;
export default { add, subtract };
@rm-rf-etc
rm-rf-etc / do_query.js
Last active October 24, 2019 03:04
Cayley Graph Database Example - Get user with friends
function predicatesToList(thingId) {
var thing = g.V(thingId);
var result = [];
thing.outPredicates().map(function(a){
if (!a) return;
thing.out(a.id).map(function(b){
result.push([a.id, b.id]);
});
@rm-rf-etc
rm-rf-etc / The_Thunk_Emperor_Has_No_Clothes.js
Last active July 11, 2019 21:31
The Thunk Emperor Has No Clothes
/******************************\
The Thunk Emperor Has No Clothes
\******************************/
/* ACT ONE
myAction:
"I'm an action creator!"