Two ways of streaming in Node.js:
readable.pipe(writable)
| { | |
| "type": "object", | |
| "properties": { | |
| "DialCapture": { | |
| "then": { | |
| "properties": { | |
| "General": { | |
| "type": "object", | |
| "properties": { | |
| "GeneralGroup1": { |
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |
| const foo = { | |
| bar: 'baz', | |
| qux: 'quux' | |
| } | |
| Object.defineProperty(foo, 'bar', { writable: false }) // code in next line won't change property | |
| foo.bar = 'cargo' // this won't work | |
| console.log(foo) // still: bar = 'baz' | |
| console.log(Object.getOwnPropertyDescriptors(foo)) // baz is not-writable |
| // Future versions of Hyper may add additional config options, | |
| // which will not automatically be merged into this file. | |
| // See https://hyper.is#cfg for all currently supported options. | |
| module.exports = { | |
| config: { | |
| // Choose either "stable" for receiving highly polished, | |
| // or "canary" for less polished but more frequent updates | |
| updateChannel: 'canary', |
| ### | |
| # open_repo <name: $1> open new local project | |
| # git_init <name: $1> open new repository on GitHub | |
| ### | |
| # The only argument which should be pass into commands is you <project_name>. | |
| # $1 will be overwritten with it. | |
| ### | |
| # It's made for OAuth verification, so you need to provie your GitHub Token with proper access. | |
| function open_repo() { |
| #!/bin/zsh | |
| chmod +x getopts.sh | |
| while getopts ":a:" opt; do | |
| case $opt in | |
| a) | |
| if [ ! -d "$OPTARG" ]; then | |
| [ -f "$OPTARG" ] && echo "Opening file..." && open "$OPTARG" | |
| elif [ -d "$OPTARG" ]; then | |
| echo "Opening folder..." && open "$OPTARG" |
| /* more info: https://nodejs.org/dist/latest-v11.x/docs/api/buffer.html */ | |
| const options = { | |
| path: '/Path/to/your/file', | |
| pass: 'your-password', | |
| encoding: 'base64' | |
| } | |
| const {path, data, encoding, ...others} = options | |
| const append = fs.appendFile(path, pass, encoding, (pass) => { |
| # <type>: (If applied, this commit will...) <subject> (Max 50 char) | |
| # |<---- Using a Maximum Of 50 Characters ---->| | |
| # Explain why this change is being made | |
| # |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
| # Provide links or keys to any relevant tickets, articles or other resources | |
| # Example: Github issue #23 |