brew search php
brew install [email protected]
brew install [email protected]
(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 php
brew 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; |
(ns phel-exercises\exercise\count-words) | |
(defn- fill-keys | |
"Exchanges all keys with their associated values in an array." | |
[xs v] | |
(-> (to-php-array xs) | |
(php/array_fill_keys v) | |
(php-array-to-table))) | |
###################### |
pushedrev=$1 | |
basename=${2:-develop} | |
if ! baserev="$(git rev-parse --verify refs/heads/"$basename" 2>/dev/null)"; then | |
echo "'$basename' is missing, call for help!" | |
exit 1 | |
fi | |
parents_of_commits_beyond_base="$( | |
git rev-list --pretty=tformat:%P "$pushedrev" --not "$baserev" | |