Setup
bin/kafka-topics.sh \
--zookeeper zookeeper.example.com:2181 \
--create \| #!/usr/bin/env bash | |
| NODESAPI=/api/v1/nodes | |
| function getNodes() { | |
| kubectl get --raw $NODESAPI | jq -r '.items[].metadata.name' | |
| } | |
| function getPVCs() { | |
| jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) | '\ |
| const iota = (() => { let n = 0; return () => n++ })() | |
| const myEnum = { | |
| foo: iota(), // 0 | |
| bar: iota(), // 1 | |
| baz: iota(), // 2 | |
| qux: iota(), // 3 | |
| } |
| /* | |
| * Handling Errors using async/await | |
| * Has to be used inside an async function | |
| */ | |
| try { | |
| const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
| // Success 🎉 | |
| console.log(response); | |
| } catch (error) { | |
| // Error 😨 |
| { | |
| "name": "npm-scripts-example", | |
| "version": "1.0.0", | |
| "description": "npm scripts example", | |
| "scripts": { | |
| "clean": "rimraf ./dist && mkdir dist", | |
| "prebuild": "npm run clean", | |
| "build": "cross-env NODE_ENV=production webpack" | |
| } | |
| } |
| key:"string value" | |
| int_key:22 |