Skip to content

Instantly share code, notes, and snippets.

View tzachbon's full-sized avatar
💻

Zach Bonfil tzachbon

💻
View GitHub Profile
@tzachbon
tzachbon / codex-worktrees.md
Last active March 7, 2026 21:13
Prompt: add codex yolo + worktree shell function

Add a codex shell function to ~/.zshrc (or ~/.bashrc) that:

  1. Always runs codex in full-auto / yolo mode (--dangerously-bypass-approvals-and-sandbox)
  2. Supports a -w [name] flag that creates a git worktree at ~/.worktrees/<repo-name>/<name> from the current HEAD, then opens codex inside it. If no name is given, auto-generates one from the current timestamp (e.g. codex-20260307-143022).

Add this to your shell config:

import { Signal } from 'signal-polyfill';
import { effect } from 'signal-effect';
export function setupCounter(element: HTMLButtonElement) {
const counter = new Signal.State(0);
effect(() => (element.innerText = String(counter.get())));
element.addEventListener('click', () => counter.set(counter.get() + 1));
}
@tzachbon
tzachbon / JS_DEV_SETUP.md
Last active March 6, 2026 15:42
Javascript Developer Setup for Mac

Javascript Developer Setup for Mac

This guide is for those who want to prepare their Mac for javascript developement, I attached here some apps that will surely help you and recommendations that are sure to make your life easier.

Specially thanks to my colleagues at wix.com for bring up most of those ideas

TOC

@tzachbon
tzachbon / with-observable.ts
Created November 20, 2019 14:51
WithObservable
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { ReRenderOnChange, SetChecker, WithObservable } from '@intelligo.ai/bonfire';
@ReRenderOnChange()
@Component({
selector: 'app-test',
styles: [
`
@tzachbon
tzachbon / set-checker.ts
Last active November 20, 2019 14:43
SetChecker
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { ReRenderOnChange, SetChecker, WithObservable } from '@intelligo.ai/bonfire';
@ReRenderOnChange()
@Component({
selector: 'app-test',
styles: [
`