Skip to content

Instantly share code, notes, and snippets.

View OdNairy's full-sized avatar

Roman Gardukevich OdNairy

View GitHub Profile
@flamerix-ai
flamerix-ai / README.md
Last active November 18, 2026 19:30
Claude Code burns ~15-20% of your tokens on a 3-word status line: a Bun preload that turns agent_summary off Β· by Flamerix AI, flamerix.ai Β· MIT

Claude Code burns ~15–20% of your tokens on a 3-word status line. Here's how to turn it off

by Flamerix AI Β· MIT License

Platforms: Linux and Windows 11 tested by us; macOS reported by others. Tested on Claude Code 2.1.257–2.1.317. The binary is not modified (BUN_OPTIONS=--preload). An update can silently undo it, so see Verify.

TL;DR

Every ~30 seconds, Claude Code re-sends each background agent's full transcript to the model to

@philippb
philippb / README.md
Created September 25, 2026 03:39
APFS copy-on-write sharing for Git worktrees: implementation guide for coding agents, reference helper, and tests

Save disk space across Git worktrees with APFS copy-on-write clones

Git worktrees share the Git object database, but large checked-out files can still occupy separate disk blocks. On macOS/APFS, identical files can share their data blocks while remaining independently editable files.

In one dependency-heavy iOS repository, a post-checkout sharing pass shared about 761–766 MB of logical file contents per worktree, across roughly 217–249 files. An initial real-worktree experiment measured a 760.14 MB decrease in APFS private data. These are workload-specific results, not a promise for every repository. All MB figures here are decimal.

The core idea

  1. Let Git create and check out the worktree normally. Finish dependency and project generation.
  2. Enumerate tracked regular files in the destination. This helper considers files at least 64 KiB and conservatively excludes Swift files, a policy inherited from its original repository.
@kamilogorek
kamilogorek / _screenshot.md
Last active April 14, 2026 18:02
Clutter-free VS Code Setup
image

How to install game-porting-toolkit (aka proton for macOS)

You also might wanna just use Whisky which does this automatically

This guide works on macOS 13.4+ using Command Line Tools for XCode 15 Beta!

What is this?

In the recent WWDC, Apple announced and released the "game porting toolkit", which upon further inspection this is just a modified version of CrossOver's fork of wine which is a "compatibility layer" that allows you to run Windows applications on macOS and Linux.

@rileytestut
rileytestut / ExportIPA.swift
Last active October 8, 2026 09:07
Export Swift Playgrounds .ipa
import Foundation
// Export running app as .ipa, then return path to exported file.
// Returns String because app crashes when returning URL from async function for some reason...
func exportIPA() async throws -> String
{
// Path to app bundle
let bundleURL = Bundle.main.bundleURL
// Create Payload/ directory
@IsaacXen
IsaacXen / README.md
Last active July 18, 2026 12:57
(Almost) Every WWDC videos download links for aria2c.
import UIKit
class ViewController: UIViewController {
let tableView: UITableView = {
let tv = UITableView(frame: .zero, style: .plain)
tv.register(UITableViewCell.self, forCellReuseIdentifier: "Cell")
return tv
}()
@danielmartin
danielmartin / BetterXcodeJumpToCounterpartSwift.org
Last active October 30, 2025 15:47
Add support for a better Xcode's Jump to Next Counterpart in Swift

If you work on a Swift project that follows the Model-View-ViewModel (MVVM) architecture or similar, you may want to jump to counterpart in Xcode from your view to your model, and then to your view model. (ie. by using Ctrl+Cmd+Up and Ctrl+Cmd+Down).

You can do this in recent versions of Xcode by setting a configuration default.

From a terminal, just type this command and press Enter:

defaults write com.apple.dt.Xcode IDEAdditionalCounterpartSuffixes -array-add "ViewModel" "View"
@atomicbird
atomicbird / logMilestone.swift
Last active July 24, 2026 21:18
Sometimes you just want to print a message that tells you a line of code was executed. Inspired by a tweet from Paige Sun: https://twitter.com/_PaigeSun/status/1161132108875796480
/// Log the current filename and function, with an optional extra message. Call this with no arguments to simply print the current file and function. Log messages will include an Emoji selected from a list in the function, based on the hash of the filename, to make it easier to see which file a message comes from.
/// - Parameter message: Optional message to include
/// - file: Don't use; Swift will fill in the file name
/// - function: Don't use, Swift will fill in the function name
/// - line: Don't use, Swift will fill in the line number
func logMilestone(_ message: String? = nil, file: String = #file, function: String = #function, line: Int = #line) -> Void {
#if DEBUG
// Feel free to change the list of Emojis, but don't make it shorter, because a longer list is better.
let logEmojis = ["πŸ˜€","😎","😱","😈","πŸ‘Ί","πŸ‘½","πŸ‘Ύ","πŸ€–","πŸŽƒ","πŸ‘","πŸ‘","🧠","πŸŽ’","🧀","🐢","🐱","🐭","🐹","🦊","🐻","🐨","🐡","πŸ¦„","πŸ¦‹","🌈","πŸ”₯","πŸ’₯","⭐️","πŸ‰","πŸ₯","🌽","πŸ”","🍿","🎹","🎁","❀️","🧑","πŸ’›","πŸ’š","πŸ’™","πŸ’œ","πŸ””"]
let logEmoji = logEmojis[abs(
@steipete
steipete / UIWindow+PSPDFAdditions.h
Last active June 5, 2024 20:09
Mac Catalyst: Get the NSWindow from a UIWindow (Updated for macOS 11 Big Sur, also works with Catalina)
// Don't forget to prefix your category!
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UIWindow (PSPDFAdditions)
#if TARGET_OS_UIKITFORMAC