This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"text/vnd.wap.wmlscript": "Wireless Markup Language Script (WMLScript)", | |
"application/cu-seeme": "CU-SeeMe", | |
"application/vnd.mobius.plc": "Mobius Management Systems - Policy Definition Language File", | |
"application/vnd.dna": "New Moon Liftoff/DNA", | |
"application/mathml+xml": "Mathematical Markup Language", | |
"image/x-cmx": "Corel Metafile Exchange (CMX)", | |
"application/vnd.oasis.opendocument.text": "OpenDocument Text", | |
"application/vnd.ezpix-album": "EZPix Secure Photo Album", | |
"application/xslt+xml": "XML Transformations", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
if [ ! -f /var/www/html/public/doDeploy ]; then | |
exit; | |
fi | |
rm /var/www/html/public/doDeploy | |
STAMP=$(date +%s) | |
WORKDIR=/tmp/$STAMP | |
NEWDIR=$WORKDIR/new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_headers.c> | |
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$"> | |
Header set Access-Control-Allow-Origin "*" | |
</FilesMatch> | |
</IfModule> | |
<IfModule mod_rewrite.c > | |
RewriteEngine on | |
RewriteOptions inherit |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DirectoryIndex disabled | |
RewriteEngine On | |
RewriteRule ^$ http://127.0.0.1:3000/ [P,L] | |
RewriteRule ^(.*)$ http://127.0.0.1:3000/$1 [P,L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$initialState = [ | |
'count' => [ | |
'count' => 1 | |
], | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$initialState['count']['count'] +=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
const INCREMENT_ACTION = 'INCREMENT'; | |
const DECREMENT_ACTION = 'DECREMENT'; | |
$actions = [ | |
'increment' => [ | |
'type' => INCREMENT_ACTION | |
], | |
'decrement' => [ | |
'type' => DECREMENT_ACTION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function countReducer(array $state, $action) { | |
switch($action['type']) { | |
case INCREMENT_ACTION: | |
return array_replace([], $state, ['count' => $state['count'] + 1]); | |
case DECREMENT_ACTION: | |
return array_replace([], $state, ['count' => $state['count'] - 1]); | |
default: | |
return $state; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Store | |
{ | |
protected array $state; | |
protected Closure $reducer; | |
public function __construct(callable $reducer, array $initialState) | |
{ | |
$this->state = $initialState; | |
$this->reducer = Closure::fromCallable($reducer); | |
} |
OlderNewer