http://docs.aws.amazon.com/cli/latest/userguide/using-s3-commands.
aws s3 sync <source> <target> [--options]
function omit(keys, obj) { | |
return keys.reduce((o, k) => { | |
o[k] = obj[k] | |
return o | |
}, {}) | |
} |
// requires node > 8 | |
const lebab = require('lebab') | |
const prettier = require('prettier') | |
const util = require('util') | |
const readFile = util.promisify(require('fs').readFile) | |
;(async () => { | |
try { | |
const input = process.argv.slice(2)[0] | |
const body = await readFile(input, 'utf8') |
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true | |
max_line_length = 100 |
http://docs.aws.amazon.com/cli/latest/userguide/using-s3-commands.
aws s3 sync <source> <target> [--options]
position | |
top | |
right | |
bottom | |
left | |
z-index | |
display | |
float | |
width | |
height |
{ | |
"plugins": [ | |
[ | |
"module-resolver", | |
{ | |
"root": ["./src"], | |
"alias": { | |
"^\\$(.+)": "./src/\\1" | |
} | |
} |
export function listNodeMidiPorts(portType) { | |
const io = new require('midi')[portType]() | |
return Array(io.getPortCount()) | |
.fill(null) | |
.map((_, index) => io.getPortName(index)) | |
} | |
export function getNodeMidiPortNumberByName(portType, name) { | |
const io = new require('midi')[portType]() |
export function isEventWithin(e, element) { | |
const rect = element.getBoundingClientRect() | |
return ( | |
rect.top <= e.clientY && | |
e.clientY <= rect.top + rect.height && | |
rect.left <= e.clientX && | |
e.clientX <= rect.left + rect.width | |
) | |
} |
const rotate = (array, n) => [ | |
...array.slice(array.length - n), | |
...array.slice(0, array.length - n), | |
] |
const { spawn } = require('child_process') | |
const chokidar = require('chokidar') | |
const chalk = require('chalk') | |
const paths = ['./src/main.js'] | |
let child | |
let wait = false | |
spawnElectron() |