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
| /** | |
| * Get audio from built-in mic, ready to be processed. | |
| * use rec output.wav if you want to just record audio. | |
| * | |
| * Usage: node mic.js | |
| * Prereq: brew install sox | |
| * | |
| * Note: to covert .raw output to .wav file: | |
| * sox -t raw -r 16000 -b 16 -c 1 -L -e signed-integer output.raw abbas.wav | |
| * |
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
| /** | |
| * Coverts a .txt file containing | |
| * binary values to a .png image | |
| * | |
| * Usage: node binary2png.js binary.txt | |
| */ | |
| let fs = require('fs'); | |
| let PNG = require('pngjs').PNG; | |
| const inputFile = process.argv.slice(2)[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
| /** | |
| * Coverts the input file to its binary representation | |
| * Usage: node text2binary.js myBundle.js | |
| */ | |
| let fs = require('fs'); | |
| const inputFile = process.argv.slice(2)[0]; | |
| const outputPath = `${inputFile}_binary.txt`; | |
| fs.readFile(inputFile, 'utf8', (err, data) => { | |
| if (err) throw err; |
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 fs = require('fs'); | |
| const inputPath = 'composer.json'; | |
| const outputPath = 'composer.json'; | |
| var composerfile; | |
| fs.readFile(inputPath, 'utf8', function (err, data) { | |
| if (err) throw err; | |
| composerfile = JSON.parse(data); | |
| composerfile.config['vendor-dir'] = "./../path-to-vendor"; | |
| // delete composerfile.config['vendor-dir']; |
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
| let config = Encore.getWebpackConfig(); | |
| config.watchOptions = { poll: true, ignored: /node_modules/ }; | |
| config.plugins.push( | |
| new BrowserSyncPlugin( | |
| { | |
| host: 'aro.tech', | |
| proxy: 'aro.tech', | |
| files: [ // watch on changes | |
| { | |
| match: ['public/build/**/*.js'], |