brew search php
brew install php@7.4brew install php@8.0
| #!/bin/bash | |
| # Shared StatusLine for Claude Code | |
| # Shows: robbyrussell prompt + model + cost + tokens + context % + 5h rate limit + 7d rate limit | |
| # Override locally via .claude/settings.local.json | |
| input=$(cat) | |
| # Parse all values in single jq call for performance | |
| eval $(echo "$input" | jq -r ' | |
| @sh "dir=\(.workspace.current_dir // .cwd // "unknown")", |
| #!/usr/bin/env php | |
| <?php | |
| declare(strict_types=1); | |
| /** | |
| * Life Calendar Visualizer | |
| * | |
| * This script prints a visual timeline of a person's life in years and "day pairs", | |
| * where each line represents a year, and each character represents 2 days. | |
| * It uses `X` for days already lived and `_` for days yet to come. |
| #!/usr/bin/env bash | |
| ################################################################################### | |
| # usage example: bash local/release_chart.sh TypedDevs/bashunit --last 300 | |
| ################################################################################### | |
| set -euo pipefail | |
| REPO="" | |
| LIMIT_DAYS=60 |
| (ns phel-testing\local) | |
| (defn fib [n] | |
| (loop [fib-nums [0 1]] | |
| (if (>= (count fib-nums) n) | |
| (slice fib-nums 0 n) | |
| (let [[n1 n2] (reverse fib-nums)] | |
| (recur (push fib-nums (+ n1 n2))))))) | |
| (println (fib 50)) |
| package main | |
| import ( | |
| "fmt" | |
| "math/rand" | |
| "os" | |
| "os/exec" | |
| "os/signal" | |
| "sync" | |
| "time" |
| # highlight_line | |
| # | |
| # arg $1 file path; it can contain the line directly at the end after : | |
| # arg $2 line or range; the line if it was not specified in the file path ($1) | |
| # arg $3 range; the range +- to display from the line | |
| # | |
| # Usage example: | |
| # hl file/path/foo.txt 47 | |
| # hl file/path/foo.txt 47 3 | |
| # hl file/path/foo.txt:47 |
| ######################################################################################### | |
| # This is a working (and simplified) example of the snake-cli-game, with the following elements: | |
| # - A board | |
| # - A snake with constant speed inside the board | |
| # - The game ends when the snake touches the board | |
| ######################################################################################### | |
| # Try it out: vendor/bin/phel run src/simple-cli-snake-game.phel | |
| ######################################################################################### | |
| # composer dependencies: | |
| # > "phel-lang/phel-lang": "dev-master" - the phel language: https://phel-lang.org/ |
| My Public Key: "npub1ch2gzhpxux8zc9upxvqy5mwm4x5k5hm6772682mqd5g65yz4z34qg4sxwx" |
| # Install the different PHP versions from `shivammathur` | |
| brew install shivammathur/php/php@7.4 | |
| brew install shivammathur/php/php@8.0 | |
| brew install shivammathur/php/php@8.1 | |
| # Create a function in your `.zshrc` like: | |
| sphp() { | |
| brew unlink php && brew link --overwrite --force php@$1 | |
| } |