This file contains 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
exec_realtime_io(cmd,log_cb,param_array,process_stdout_cb,process_stderr_cb,close_cb) { | |
var stdout=''; | |
var stderr=''; | |
log_cb(`running ${cmd} ${param_array}`); | |
var c = spawn(cmd,param_array); | |
c.stdout.on('data',(data)=> { stdout+=data; process_stdout_cb(data); }); | |
c.stderr.on('data',(data)=> { stderr+=data; process_stderr_cb(data); }); | |
c.on('close',(code)=>{ close_cb(code, stdout, stderr);}); | |
} |
This file contains 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 | |
#suppose we have a NAS bookmarked as music w/audio stored in "artist/album" format: | |
# ls_nas.sh music #list all artists | |
# ls_nas.sh music L #list all arists starting w/L | |
# ls_nas.sh music L*/ #list all albums of artists starting w/L | |
if [[ "$#" < 1 ]]; then | |
echo "ls_nas.sh <bookmark> [glob]" | |
echo " " |
This file contains 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 fs = require(‘fs’); | |
function foo (a, b, f) { | |
new Promise((resolve,reject)=> | |
let c=a*b; | |
fs.writeFile(f,`${a} * ${b} = ${c}`, (err) => { if (err) { console.log(`issue writing data to ${f}: ${err}`); reject (err); } | |
resolve(c); | |
}); | |
}); | |
} |
This file contains 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
{ | |
"name": "abjscdef", | |
"version": "0.2.0", | |
"description": "A better javascript cd encoder - flac", | |
"main": "abjscdef.js", | |
"scripts": { | |
//...per github.. | |
}, | |
"author": "const void*", | |
"license": "MIT", |