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
| #!/bin/bash | |
| cd /tmp | |
| if [ ! -d /tmp/ElvUI ]; then | |
| git clone https://github.com/tukui-org/ElvUI.git | |
| cd ElvUI | |
| else | |
| cd ElvUI | |
| git fetch |
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
| const Bar = () => {}; | |
| module.exports = { | |
| Bar | |
| }; |
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
| // Place your settings in this file to overwrite the default settings | |
| { | |
| "files.autoSave": "onFocusChange", | |
| "editor.tabSize": 4, | |
| "editor.renderWhitespace": "all", | |
| "editor.minimap.enabled": true, | |
| "editor.minimap.renderCharacters": false, | |
| "editor.minimap.maxColumn": 50, | |
| "editor.cursorStyle": "block", | |
| "workbench.activityBar.visible": true, |
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
| apt-get install -y \ | |
| apt-transport-https \ | |
| ca-certificates \ | |
| curl \ | |
| software-properties-common | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| add-apt-repository \ | |
| "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ |
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
| Writer "pipe" | |
| Reader "data" | |
| Writer "_write" <Buffer 68 65 6c 6c 6f> force drain false | |
| Reader "readable" | |
| Reader "readable" | |
| Writer "drain" | |
| Reader "data" | |
| Writer "_write" <Buffer 68 65 6c 6c 6f> force drain false | |
| Reader "readable" | |
| Writer "drain" |
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
| const Readable = require('stream').Readable; | |
| const Writable = require('stream').Writable; | |
| const Transform = require('stream').Transform; | |
| class Reader extends Readable { | |
| constructor(options) { | |
| super(options); |
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 jobs = GetJobsAsync(); | |
| var processBlock = new TransformBlock<JobResult, Job>( | |
| async job => | |
| { | |
| return await processAsync(job); | |
| }, | |
| new ExecutionDataflowBlockOptions {MaxDegreeOfParallelism = 40} | |
| ); |
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
| const Promise = require('bluebird'); | |
| const jobs = listJobs(); | |
| Promise | |
| .map(jobs, (job) => processAsync(job), 40) | |
| .then(() => console.log('done')); |
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
| const Async = require('asynclib'); | |
| const jobs = listJobs(); | |
| Async.mapLimit( | |
| jobs, | |
| 40, | |
| (job, cb) => processAsync(job, cb), | |
| (err) => console.log('done') | |
| ); |
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
| queue := make(chan Job) | |
| workerPool := make(chan Worker, 40) | |
| //uses the queue to send jobs to | |
| go getJobs(queue) | |
| for { | |
| select { | |
| // channel dequeue | |
| case job := <- queue: |
NewerOlder