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 serial = {}; | |
| function buf2hex(buffer) { // buffer is an ArrayBuffer | |
| return Array.prototype.map.call(new Uint8Array(buffer), x => ('00' + x.toString(16)).slice(-2)).join(''); | |
| } | |
| (function() { | |
| 'use strict'; | |
| serial.status = 0; //disconnected |
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
| }, | |
| ], | |
| ), | |
| ), | |
| } | |
| }, | |
| ) | |
| }, | |
| })) |
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
| 00 - 33 ******************************************** | |
| 01 - 37 ************************************************** | |
| 02 - 22 ***************************** | |
| 03 - 10 ************* | |
| 04 - 0 | |
| 05 - 0 | |
| 06 - 0 | |
| 07 - 0 | |
| 08 - 0 | |
| 09 - 0 |
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
| serial.Port.prototype.init = async () => { | |
| try { | |
| console.log(await this.vendorRead( 0x8484)) | |
| await this.vendorWrite(0x0404 , 0) | |
| console.log(await this.vendorRead( 0x8484)) | |
| await this.vendorWrite(0x0404 , 1) | |
| await this.vendorWrite(0 , 1) | |
| await this.vendorWrite(1 , 0) | |
| await this.vendorWrite(2 , 0x24) | |
| } catch (eee) { |
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
| " Don't change working directory. | |
| let g:ctrlp_working_path_mode = '' | |
| " How CtrlP finds files. For now it uses git/hg when possible, but fallbacks to find. | |
| let g:ctrlp_user_command = { | |
| \ 'types': { | |
| \ 1: ['.git', 'cd %s && git ls-files -oc --exclude-standard'], | |
| \ 2: ['.hg', 'hg --cwd %s locate -I .'], | |
| \ }, | |
| \ 'fallback': 'find %s -type f -o -type 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
| 22 plugin(s) updated. | |
| [================================================================] | |
| Last update: | |
| ------------ | |
| - Colorizer: | |
| * 5859f76 say thanks! (3 weeks ago) | |
| - coc-css: |
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
| $ node src/index.js -h | |
| Options: | |
| --make e.g. bmw [string] [required] | |
| --fuel [string] [choices: "petrol", "gas", "diesel", "hybrid"] | |
| --transmission [string] [choices: "manual", "automatic"] | |
| --year-from e.g. 2006 [string] | |
| --year-to e.g. 2009 [string] | |
| --liters-from e.g. 2.0 [string] | |
| --liters-to e.g. 2.5 [string] | |
| --email-to [string] [default: "[email protected]"] |
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
| " VimL source. | |
| Plug 'Shougo/neco-vim' | |
| Plug 'https://github.com/neoclide/coc-neco' | |
| " CSS source. | |
| Plug 'neoclide/coc-css', {'do': 'yarn install --frozen-lockfile --force'} | |
| " JSON source. | |
| Plug 'neoclide/coc-json', {'do': 'yarn install --frozen-lockfile --force'} |
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
| for (let i = 0; i < 10; i++) { | |
| for (let j = 0; j < 10; j++) { | |
| const isFilled = | |
| i === 0 || | |
| i === 9 || | |
| j === 0 || | |
| j === 9 || | |
| i === j || | |
| i === 9 - j | |
| process.stdout.write(isFilled ? '#' : ' ') |
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
| call coc#config('coc.preferences', { | |
| \ 'suggest.enablePreview': 1, | |
| \ 'diagnostic.errorSign': 'E', | |
| \ 'diagnostic.warningSign': 'W', | |
| \ 'diagnostic.infoSign': 'I', | |
| \ 'diagnostic.hintSign': 'H', | |
| \ 'eslint.packageManager': 'yarn', | |
| \ 'eslint.filetypes': ['javascript', 'javascriptreact', 'typescript'], | |
| \ 'javascript.suggest.enabled': 1, | |
| \ }) |