Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
#!/bin/bash | |
for file in `find .` | |
do | |
EXTENSION="${file##*.}" | |
if [ "$EXTENSION" == "php" ] || [ "$EXTENSION" == "phtml" ] | |
then | |
RESULTS=`php -l $file` |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
<?php declare(strict_types=1); | |
// @mathiasverraes | |
// parser is a function that takes some input and returns (either (structured value AND remainder) OR error) | |
// parser is a function that takes some input and returns a Result | |
$a = function ($input) { | |
$parsed = substr($input, 0, 1); | |
$remainder = substr($input, 1); | |
if ($parsed === 'a') return succeed($parsed, $remainder); else return fail("expected a"); | |
}; |
#! /bin/sh | |
alias gs="git status" | |
alias gc="git commit" | |
alias gr="git checkout" | |
alias ga="git add" | |
alias gl="git lola" |
<?php | |
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);} |
My kid 11yo has a blood phobia. I asked Twitter for suggestions for action/adventure/scifi/fantasy/comedy movies that are suitable for a 9 and 11 yo who like Star Wars and Back to the Future.
Below are the movies people have suggested. They often did so from memory, and I haven't validated if they are indeed suitable. However, I learned about this site where you can lookup if a moview has blood or other phobia-inducing content: https://www.doesthedogdie.com/
git clone git://github.com/mkoppanen/php-zmq.git
cd php-zmq
phpize && ./configure
make && make install
Finally add the following line to your php.ini:
<?php | |
// Context: I'm trying to argue that DI (and DIC) are great, and DIC libs suck. | |
// Happy to be proven wrong! | |
final class Router { | |
private $dependencies; | |
public function __construct (Dependencies $dependencies) { | |
$this->dependencies = $dependencies; | |
// You might say that this is Service Locator, but it's not. This router is toplevel, | |
// and toplevel must have access to dependencies. After that it can all just bubble nicely using proper DI. |
[alias] | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative |
<?php declare(strict_types=1); | |
/* | |
* This file is part of the Parsica library. | |
* | |
* Copyright (c) 2020 Mathias Verraes <mathias@verraes.net> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |