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 | |
/** | |
* Streaming json writer. Call generator to set up, | |
* file isn't opened until you call send(). | |
* | |
* Pass objects with send until you're done. You can call send(null) to close | |
* or let the finally finish up and close out the file at end of execution. | |
* | |
* @param string $file - File path to write to |
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
/** | |
* Example cache class that uses promises to resolve. | |
*/ | |
class Cache { | |
constructor() { | |
this.store = {}; | |
} | |
async get(key) { | |
return this.store[key]; | |
} |
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
/** | |
* MiniMap.js - MiniMap for the game Adventure.Land | |
* | |
* Features: | |
* Event emitter | |
* Drag to reposition | |
* Numpad plus/minus to zoom | |
* Toggle visibility to show or hide | |
* Left click to interact with markers, right click to smart move | |
* Easily extensible |
OlderNewer