Skip to content

Instantly share code, notes, and snippets.

View lamchakchan's full-sized avatar

Lam Chan lamchakchan

View GitHub Profile
@lamchakchan
lamchakchan / copy-latest-elv-ui.sh
Last active October 1, 2022 22:51
Copy Latest ElvUI Script
#!/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
const Bar = () => {};
module.exports = {
Bar
};
// 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,
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 \
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"
const Readable = require('stream').Readable;
const Writable = require('stream').Writable;
const Transform = require('stream').Transform;
class Reader extends Readable {
constructor(options) {
super(options);
var jobs = GetJobsAsync();
var processBlock = new TransformBlock<JobResult, Job>(
async job =>
{
return await processAsync(job);
},
new ExecutionDataflowBlockOptions {MaxDegreeOfParallelism = 40}
);
const Promise = require('bluebird');
const jobs = listJobs();
Promise
.map(jobs, (job) => processAsync(job), 40)
.then(() => console.log('done'));
const Async = require('asynclib');
const jobs = listJobs();
Async.mapLimit(
jobs,
40,
(job, cb) => processAsync(job, cb),
(err) => console.log('done')
);
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: