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
| nnoremap <silent> <leader>s :<C-u>call system('espeak ' . expand('<cword>'))<CR> |
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
| (() => { | |
| function nArray(n, mapperFn) { | |
| return new Array(n).join(' ').split(' ').map(mapperFn) | |
| } | |
| function getRandomString(length) { | |
| return nArray(length, e => | |
| String.fromCharCode(Math.round(Math.random() * 126)) | |
| ).join('') | |
| } |
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
| <canvas id="canvas"></canvas> |
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
| function rootTemplate(categories) { | |
| return ` | |
| <div class="root-container"> | |
| ${ getCategoryMarkup(categories) } | |
| </div> | |
| ` | |
| } | |
| function itemsTemplate(items, level) { | |
| return ` |
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
| /* | |
| * It takes an expression and a handler object | |
| * that consists of potential actual values of | |
| * the given expression. | |
| * | |
| * The function calls either the | |
| * matching method or the default defined in | |
| * handler object (if defined). | |
| */ | |
| function take(expression, handler) { |
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
| <canvas id="canvas"></canvas> |
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
| var asset = { | |
| bitmap: [ | |
| `A A A B B B`, | |
| `A . . . . B`, | |
| `A . 1 1 . B`, | |
| `D . 2 2 . C`, | |
| `D . . . . C`, | |
| `D D D C C C` | |
| ].map(row => row.split(' ')), | |
| size: 6 |
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
| var colors = { | |
| 0: 'transparent', | |
| 1: 'white', | |
| 2: '#aaa' | |
| } | |
| var planetMap = [ | |
| [ 0, 0, 1, 9, 1 ], | |
| [ 0, 0, 1, 8, 1 ], | |
| [ 1, 1, 1, 7, 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
| navigator.requestMIDIAccess() | |
| .then(onMIDISuccess, onMIDIFailure); | |
| function onMIDIFailure() { | |
| console.log('Could not access your MIDI devices.'); | |
| } | |
| function onMIDISuccess(midiAccess) { | |
| console.log(midiAccess); |