This file contains 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains 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
type Predicate<T> = (x: T) => boolean; | |
/** | |
* Usage: | |
* ```typescript | |
* const factory = when(something) | |
* .match( (x) => someLogicReturningTrue ) | |
* .then( () => anyLogicToProduceResult ) | |
* .byDefault( () => defaultLogicWhenNoMatches ) | |
* |
This file contains 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
const rootReducer = (...reducers) => { | |
return (stateInit, action) => { | |
return reducers.reduce( | |
(state, reducer, at) => { | |
return reducer(state, action) || state | |
}, | |
stateInit | |
); | |
} | |
}; |
This file contains 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 | |
`cd "../.."; chmod 777 $(find ./* -type d); chmod 666 $(find ./* -type f)`; |
This file contains 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 | |
namespace velosipedist\sami\translator; | |
/** | |
* Implements necessary methods for use with stream_wrapper_register($this->protocol, FileStreamWrapper) | |
* There is only needed method to implement — process() | |
*/ | |
abstract class FileStreamWrapper | |
{ | |
/** |
This file contains 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
# PLUGIN MEDIATOR FOR DOC-BASED KEYS | |
class docStreamWrapper | |
# ... garbage | |
def getContents(filename) | |
return translator.translateFile(filename.withoutProtocol 'doc://') | |
end | |
end | |
# PLUGIN MEDIATOR FOR SIGNATURE BASED KEYS | |
class classVisitor |
This file contains 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 var_debug($variable,$strlen=100,$width=25,$depth=10,$i=0,&$objects = array()) | |
{ | |
$search = array("\0", "\a", "\b", "\f", "\n", "\r", "\t", "\v"); | |
$replace = array('\0', '\a', '\b', '\f', '\n', '\r', '\t', '\v'); | |
$string = ''; | |
switch(gettype($variable)) { | |
case 'boolean': $string.= $variable?'true':'false'; break; |
This file contains 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
<img width=24 src=//github.global.ssl.fastly.net/images/icons/emoji/confused.png /> |
This file contains 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 | |
//todo use composer global vendor path | |
require('c:\Users\user\AppData\Roaming\Composer\vendor\autoload.php'); | |
use Underscore\Types\Arrays; | |
use Underscore\Types\String; | |
use CallbackFilterIterator as CI; | |
use RecursiveDirectoryIterator as DI; | |
use RecursiveiteratorIterator as RI; | |
use RecursiveRegexIterator as REI; |
This file contains 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
ol { | |
counter-reset: custom-counter-name; // any name, use afterwards for incrementing counter | |
// counter-reset: custom-counter-name 1; // can be started from custom index | |
li{ | |
list-style:none; | |
counter-increment: custom-counter-name; | |
} | |
li:before { | |
content: "[" counter(custom-counter-name) "]"; |
NewerOlder