class Compose
{
public static function pipe(callable ...$fns): Closure
{
return function ($initial) use ($fns) {
return array_reduce($fns, fn ($prev, $curr) => $curr($prev), $initial);
};
}
}
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 Result | |
* | |
* This class encapsulates the result of a callable operation, handling both success (value) and failure (error). | |
* It implements the ArrayAccess interface for array-like access to its properties ('val' and 'err'). | |
*/ | |
class Result implements ArrayAccess | |
{ |
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 Collection | |
{ | |
private $data; | |
public function __construct($data) | |
{ | |
$this->data = $data; | |
} |
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
/** | |
* a simple validation class with no external requirements | |
* @class V | |
*/ | |
class V { | |
/** | |
* some of the possible data types | |
* @static | |
* @enum | |
* @memberof V |
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 | |
gsettings set org.gnome.desktop.wm.keybindings activate-window-menu "['<Alt>space']"; | |
gsettings set org.gnome.desktop.wm.keybindings begin-move "['<Alt>F7']"; | |
gsettings set org.gnome.desktop.wm.keybindings begin-resize "['<Alt>F8']"; | |
gsettings set org.gnome.desktop.wm.keybindings close "['<Alt>F4']"; | |
gsettings set org.gnome.desktop.wm.keybindings cycle-group "['<Alt>F6']"; | |
gsettings set org.gnome.desktop.wm.keybindings cycle-group-backward "['<Shift><Alt>F6']"; | |
gsettings set org.gnome.desktop.wm.keybindings cycle-panels "[]"; | |
gsettings set org.gnome.desktop.wm.keybindings cycle-panels-backward "[]"; | |
gsettings set org.gnome.desktop.wm.keybindings cycle-windows "['<Alt>Escape']"; |
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
env: | |
commonjs: true | |
es6: true | |
extends: 'eslint:recommended' | |
globals: | |
Atomics: readonly | |
SharedArrayBuffer: readonly | |
parserOptions: | |
ecmaVersion: 2018 | |
rules: |
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
- [Complete List of HTML Meta Tags](https://gist.github.com/whitingx/3840905) | |
- [List of Usable HTML Meta and Link Tags](https://gist.github.com/kevinSuttle/1997924) | |
- [HTML5 Boilerplate explanations and suggestions of header tags](http://html5boilerplate.com/docs/head-Tips/) | |
- [Dublic Core Meta Tags](http://www.seoconsultants.com/meta-tags/dublin/) | |
- [Apple Meta Tags](http://developer.apple.com/safari/library/documentation/appleapplications/reference/safarihtmlref/articles/metatags.html) | |
- [OpenGraph Meta Tags](http://opengraphprotocol.org/) | |
- [Link Tag Meaning](http://intertwingly.net/wiki/pie/LinkTagMeaning) | |
- [Google Chrome HTML5 Tags](http://www.html5rocks.com/) |
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
"atom-beautify": | |
prettyName: "Atom Beautify" | |
homepage: "https:/atom.io/packages/atom-beautify" | |
"autoclose-html": | |
prettyName: "Autoclose Html" | |
homepage: "https:/atom.io/packages/autoclose-html" | |
"file-icons": | |
prettyName: "File Icons" | |
homepage: "https:/atom.io/packages/file-icons" | |
"language-blade": |