Skip to content

Instantly share code, notes, and snippets.

@imownbey
imownbey / codex-waybar-README.md
Last active January 3, 2026 23:35
Codex status for Waybar (running sessions + waiting/approval)

Codex Waybar Status

Shows your running Codex sessions in Waybar, per‑session:

  • Green ● = working (Codex is responding)
  • Grey ○ = waiting for you
  • Orange ⚠ = waiting for command approval
  • Each item is labeled by the directory Codex is running in (first 3 + last 3 chars)

Files

  • codex_status.py — status script
@imownbey
imownbey / EdgeSSETransport.ts
Created March 9, 2025 21:12
Edge / Cloudflare Worker & Durable Object driven McpServer transport
import { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
import { JSONRPCMessage, JSONRPCMessageSchema } from '@modelcontextprotocol/sdk/types.js';
const MAXIMUM_MESSAGE_SIZE = 4 * 1024 * 1024; // 4MB
/**
* This transport is compatible with Cloudflare Workers and other edge environments
*/
export class EdgeSSETransport implements Transport {
private controller: ReadableStreamDefaultController<Uint8Array> | null = null;

Keybase proof

I hereby claim:

  • I am imownbey on github.
  • I am cbian (https://keybase.io/cbian) on keybase.
  • I have a public key ASAcrYpmpXuv1ebZQw_jJIEriVSWO1MWrK-I2nFXmXzyLwo

To claim this, I am signing this object:

@imownbey
imownbey / nsattributedstring-ext.swift
Created June 23, 2017 19:37
Truncate a AttributedString with something other than just "..."
import Foundation
import UIKit
extension NSAttributedString {
// Get the number of lines an attributed string takes
func lineCount(atSize size: CGSize) -> Int {
let attrs = self.attributes(at: 0, effectiveRange: nil)
guard let font = (attrs[NSFontAttributeName] as? UIFont) else {
return 0
}
extension Optional {
func unwrappedOr(value: Wrapped) -> Wrapped {
switch self {
case .Some:
return self!
case .None:
return value
}
}
}
//
// UIView+TimedAnimations.m
// Bumper
//
// Created by Ian Ownbey on 6/30/15.
// Copyright © 2015 Bumpers Media Inc. All rights reserved.
//
#import "UIView+TimedAnimations.h"
#import <objc/runtime.h>
@implementation UIViewController (Helpers)
- (UIViewController *)unwrapIfNav
{
if (![self isKindOfClass:[UINavigationController class]]) {
return self;
}
for (UIViewController *ctrl in self.childViewControllers) {
if (![ctrl isKindOfClass:[UINavigationController class]]) {
buttonObject = this
buttonObjectClass = $(this).attr("class")
puts "whatsup"
var a = null;
var promise = somethingLongTahtReturnsAPromise();
function chainToAndSet(promise) {
promise.then(function(values) { a = values })
return promise;
}
function sort() {
new Promise(function(values) { _.sort(values) }