In your command-line run the following commands:
brew doctorbrew update
In your command-line run the following commands:
brew doctorbrew update| # list pods only with enabled service links. | |
| kgpoall -o jsonpath='{range .items[*]}{"\n"}{.metadata.name}{":\t"}{.spec.enableServiceLinks}' | grep true | |
| # list images used in containers (but not in initContainers!). | |
| kubectl get pods --all-namespaces -o=jsonpath='{range .items[*]}{"\n"}{.metadata.namespace}{"/"}{.metadata.name}{":\t"}{range .spec.containers[*]}{.name}{"="}{.image}{", "}{end}{end}' |sort | |
| # list containers without memory limits | |
| kubectl get pods --all-namespaces -o=jsonpath='{range .items[*]}{"\n"}{.metadata.name}{":\t"}{range .spec.containers[*]}{.resources.limits.memory}{", "}{end}{end}' |sort | grep 0, | |
| # running a pod which immidiately exists - the restart policy is crticial |
| # display VPC ID, CIDR Block and Name | |
| aws ec2 --output text --query 'Vpcs[*].{VpcId:VpcId,Name:Tags[?Key==`Name`].Value|[0],CidrBlock:CidrBlock}' describe-vpcs |
| #!/usr/bin/env bash | |
| set -eEo pipefail | |
| shopt -s inherit_errexit >/dev/null 2>&1 || true | |
| if [[ ! "$#" -eq 2 || "$1" != --bucket ]]; then | |
| echo -e "USAGE: $(basename "$0") --bucket <bucket>" | |
| exit 2 | |
| fi |
| podTemplate(label: 'mypod', containers: [ | |
| containerTemplate(name: 'docker', image: 'docker:dind', ttyEnabled: true, alwaysPullImage: true, privileged: true, | |
| command: 'dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay') | |
| ], | |
| volumes: [emptyDirVolume(memory: false, mountPath: '/var/lib/docker')]) { | |
| node ('mypod') { | |
| stage 'Run a docker thing' | |
| container('docker') { | |
| stage 'Docker thing1' |
| # python 3.6 | |
| # github3.py > 1.1.0 | |
| # developer token must have the repo & user outh2 scopes! | |
| import github3 | |
| from github3 import login | |
| from github3.git import Tag | |
| from urllib.parse import urlparse | |
| from pathlib import Path | |
| import datetime |
| { | |
| "__inputs": [ | |
| { | |
| "name": "DS_PROM-V1", | |
| "label": "prom-v1", | |
| "description": "", | |
| "type": "datasource", | |
| "pluginId": "prometheus", | |
| "pluginName": "Prometheus" | |
| } |
| apiVersion: apps/v1beta1 | |
| kind: DaemonSet | |
| metadata: | |
| name: prepull | |
| spec: | |
| selector: | |
| matchLabels: | |
| name: prepull | |
| template: | |
| metadata: |
| #!/bin/bash | |
| # | |
| # | |
| # | |
| # Start on runlevels 3, 4 and 5. Start late, kill early. | |
| # chkconfig: 345 95 05 | |
| # | |
| # | |
| #!/bin/bash |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <ctype.h> | |
| int main() { | |
| // your code goes here | |
| double sum = 0; | |
| const char *input = "300 - 400"; | |
| // const char *input = "1 + 3 / 5 * 8"; |