Example: [Opus 4.6 (1M context)] Context: 0% (↑339 ↓7.9k) | $0.53
-
Place the above script in
~/.claude/statusline.sh -
Edit
~/.claude/settings.jsonto include a new key:
"statusLine": {
The GitLens VSCode extension for inline git blames can eat IDE performance in large repos. I was able to significant improve it by removing the extension and using VSCode built-ins to achieve the same functionality.
"git.blame.editorDecoration.enabled": true,
"git.blame.editorDecoration.template": "${authorName}, ${authorDateAgo} • ${subject} (${hashShort})",
"git.blame.statusBarItem.enabled": true,
"git.blame.statusBarItem.template": "${authorName} (${authorDateAgo}) ${subject}"
Colocated (or "bare repo + worktrees") pattern is one of the most popular and cleanest way to organize git worktrees. Here's how it works:
myproject/ # Parent directory (not a checkout itself)
├── .bare/ # The bare git repo (the actual .git data)
├── .git # A file (not dir) pointing to .bare
| /** Memoizes an async function, caching the resolved value and deduplicating concurrent calls */ | |
| export const memoizePromise = <T>(fn: () => Promise<T>): (() => Promise<T>) => { | |
| let cached: T | |
| let hasCached = false | |
| let pending: Promise<T> | null = null | |
| return () => { | |
| if (hasCached) { | |
| return Promise.resolve(cached) | |
| } |
| import fs from 'fs' | |
| import Rive, { | |
| Alignment, | |
| Fit, | |
| Layout, | |
| Rive, | |
| RiveFile, | |
| FileAsset, | |
| useStateMachineInput, | |
| } from '@rive-app/react-webgl2' |
cmd+k is a normal keybindings in shells to clear. Cursor highjacks this keybindings for their generation in terminal. Update keybindings JSON to include the following to disable this behavior from Cursor.
{
"key": "shift+cmd+k",
"command": "cursorai.action.generateInTerminal",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{
"key": "cmd+k",
| import crypto from 'crypto' | |
| import {parseResourceUrl} from './utils/parseResourceUrl' | |
| interface PresignedUrlOptions { | |
| /** Url in the format `https://${bucket}.s3.${region}.amazonaws.com/${key}` */ | |
| awsResourceUrl: string | |
| expiresIn?: number | |
| } | |
| /** Creates a locally presigned AWS resource url */ |
| import {pseudoLocalizeString} from 'utils/pseudoLocalize' | |
| describe('pseudoLocalizeString', () => { | |
| it.each([ | |
| ['Hello, world!', 'Ħḗḗḗŀŀǿǿǿ, ẇǿǿřŀḓ!'], | |
| ['Get help online.', 'Ɠḗḗḗŧ ħḗḗŀƥ ǿǿƞŀīīƞḗḗ.'], | |
| [ | |
| 'The quick brown fox jumps over the lazy dog', | |
| 'Ŧħḗḗḗ ɋŭŭŭīīīƈķ ƀřǿǿǿẇƞ ƒǿǿǿẋ ĵŭŭḿƥş ǿǿṽḗḗř ŧħḗḗ ŀȧȧẑẏ ḓǿǿɠ', | |
| ], |
| import { useCallback, useState, useRef, useEffect } from 'react'; | |
| const usePromise = <T, U extends any[]>(operation: (...args: U) => Promise<T>) => { | |
| const [data, setData] = useState<T>(); | |
| const [error, setError] = useState<Error>(); | |
| const [loading, setLoading] = useState(false); | |
| const mounted = useRef<boolean>(true); | |
| useEffect( | |
| () => () => { |
| import React, { useCallback, useMemo, useRef, useState } from 'react'; | |
| import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; | |
| import LinearGradient from 'react-native-linear-gradient'; | |
| import Animated, { | |
| block, | |
| Clock, | |
| cond, | |
| Easing, | |
| eq, | |
| set, |