Let's look at some basic kubectl output options.
Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).
We can start with:
kubectl get no
| const axios = require('axios') | |
| const LinkHeader = require('http-link-header') | |
| const nextPage = (header) => { | |
| const link = LinkHeader.parse(header) | |
| const [ next ] = link.get('rel', 'next') | |
| return next && next.results === 'true' ? next.uri : null | |
| } |
| // @flow | |
| // V2 on NPM fixes notes below | |
| // https://github.com/Ephys/react-intl-formatted-xml-message | |
| // NOTE: Currently with this implementation, XML present in the variables you pass to FormattedMessageTag will also be converted to react components. | |
| // I'm working on a way to fix this issue. Right now I think that'll mean re-implementing FormattedMessage so the XML parsing part skips {variable} tags | |
| // TODO: | |
| // Replace all object or string values with placeholder tags |
| const throwIfMissing = (p) => { throw new Error(`Missing parameter: ${p}`); } | |
| function famTree(dad = throwIfMissing("dad"),mom = throwIfMissing("mom"),...siblings) { | |
| console.group("Family"); | |
| console.log(`Dad: ${dad}`); | |
| console.log(`Mom: ${mom}`); | |
| if(siblings.length > 0) { | |
| console.log(`Siblings: ${siblings.join()}`); | |
| } | |
| console.groupEnd(); |
| { | |
| "presets": [ | |
| "react", | |
| "stage-2", | |
| [ | |
| "env", | |
| { | |
| "targets": { | |
| "browsers": [ | |
| "last 2 versions", |
| function mapValues(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| result[key] = fn(obj[key], key); | |
| return result; | |
| }, {}); | |
| } | |
| function pick(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| if (fn(obj[key])) { |
| <?php | |
| /** | |
| * Get font awesome file icon class for specific MIME Type | |
| * @see https://gist.github.com/guedressel/0daa170c0fde65ce5551 | |
| * | |
| */ | |
| function font_awesome_file_icon_class( $mime_type ) { | |
| // List of official MIME Types: http://www.iana.org/assignments/media-types/media-types.xhtml |
| { | |
| // JSHint Default Configuration File (as on JSHint website) | |
| // See http://jshint.com/docs/ for more details | |
| "maxerr" : 50, // {int} Maximum error before stopping | |
| // Enforcing | |
| "bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.) | |
| "camelcase" : false, // true: Identifiers must be in camelCase | |
| "curly" : true, // true: Require {} for every new block or scope |
| /** | |
| * Angular $rootScope.Scope.$once | |
| * Copyright (c) 2014 marlun78 | |
| * MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83 | |
| */ | |
| $provide.decorator('$rootScope', function ($delegate) { | |
| var Scope = $delegate.__proto__.constructor; | |
| Scope.prototype.$once = function (name, listener) { | |
| var deregister = this.$on(name, function () { | |
| deregister(); |
| var dom = Bloop.dom; | |
| var Box = Bloop.createClass({ | |
| getInitialState: function() { | |
| return { number: 0 }; | |
| }, | |
| updateNumber: function() { | |
| this.state.number++; | |
| }, |