- Kubernetes in Action
- Cloud Native DevOps with Kubernetes
- Managing Kubernetes
- O'Reilly, 2018
This file contains 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
name: hello-world | |
on: push | |
jobs: | |
my-job: | |
runs-on: ubuntu-latest | |
steps: | |
- name: my-step | |
run: echo "Hello World!" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# Set a Bash prompt that includes the exit code of the last executed command. | |
# | |
# Setup: paste the content of this file to ~/.bashrc, or source this file from | |
# ~/.bashrc (make sure ~/.bashrc is sourced by ~/.bash_profile or ~/.profile) | |
# | |
# Daniel Weibel <danielmweibel@gmail.com> October 2015 | |
#------------------------------------------------------------------------------# | |
# Command that Bash executes just before displaying a prompt | |
export PROMPT_COMMAND=set_prompt |
This file contains 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
global: | |
scrape_interval: 10s | |
scrape_configs: | |
- job_name: node | |
static_configs: | |
- targets: | |
- localhost:9100 | |
- job_name: python-app | |
static_configs: | |
- targets: |
This file contains 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
name: release | |
on: | |
release: | |
types: [published] | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
env: | |
ARCHIVE_NAME: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }} | |
steps: |
This file contains 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
% setCrop - Adjust paper size to figure size of current figure. | |
% | |
% Usage: | |
% setCrop() | |
% | |
% Notes: | |
% Call this function after all plotting commands, after calling | |
% "setTightMargins", but before calling "print". | |
% | |
% Daniel Weibel <danielmweibel@gmail.com> November 2015 |
This file contains 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
use strict; | |
use warnings; | |
use feature qw(say); | |
use Getopt::Std; | |
# If set to true, exit script after processing --help or --version flags | |
$Getopt::Std::STANDARD_HELP_VERSION = 1; | |
our $VERSION = "0.1"; | |
#------------------------------------------------------------------------------# |
This file contains 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
#!/bin/bash | |
set -e | |
TITLE=$1 | |
CANONICAL_URL=$2 | |
if [[ "$#" -ne 2 ]]; then | |
cat <<EOF | |
USAGE |
This file contains 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
#!/bin/bash | |
kubectl get pods --all-namespaces -o 'custom-columns=:.metadata.namespace,:.metadata.name,:.spec.initContainers[*].name' | | |
while read line; do | |
namespace=$(awk '{print $1}' <<<"$line") | |
pod=$(awk '{print $2}' <<<"$line") | |
containers=($(awk '{print $3}' <<<"$line" | tr , ' ')) | |
for container in "${containers[@]}"; do | |
echo -n "$namespace | $pod | $container: " | |
kubectl exec "$pod" -n "$namespace" -c "$container" -- whoami 2>/dev/null || echo "<unknown>" |
NewerOlder