brew search php
brew install [email protected]brew install [email protected]
| #!/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" |
brew search phpbrew install [email protected]brew install [email protected]| # 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/[email protected] | |
| brew install shivammathur/php/[email protected] | |
| brew install shivammathur/php/[email protected] | |
| # Create a function in your `.zshrc` like: | |
| sphp() { | |
| brew unlink php && brew link --overwrite --force php@$1 | |
| } |
| <?php | |
| declare(strict_types=1); | |
| # Using https://github.com/gacela-project/gacela | |
| require __DIR__ . '/../vendor/autoload.php'; | |
| use Gacela\Framework\AbstractConfig; | |
| use Gacela\Framework\AbstractFacade; |