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
cms := &v1.ConfigMapList{} | |
requirement, err := labels.NewRequirement( | |
apis.LabelKey, | |
selection.Exists, | |
nil, | |
) | |
if err != nil { | |
return nil, err | |
} | |
ls := labels.NewSelector().Add(*requirement) |
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
require 'openssl' | |
OpenSSL::Random.seed File.read('/dev/random', 16) | |
root_key = OpenSSL::PKey::RSA.new 2048 # the CA's public/private key | |
root_ca = OpenSSL::X509::Certificate.new | |
root_ca.version = 2 # cf. RFC 5280 - to make it a "v3" certificate | |
root_ca.serial = 1 | |
root_ca.subject = OpenSSL::X509::Name.parse "/CN=kube-ca" | |
root_ca.issuer = root_ca.subject # root CA's are "self-signed" |
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
issue = ARGV[0][/(\d+)/, 1] | |
author = ARGV[1] | |
puts "([##{issue}](https://github.com/kubernetes/kubernetes/pull/#{issue}), [#{author}](https://github.com/#{author}))" |
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
#!/usr/bin/python | |
# | |
# Fit to TCX | |
# | |
# Copyright (c) 2012, Gustav Tiger <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a | |
# copy of this software and associated documentation files (the "Software"), | |
# to deal in the Software without restriction, including without limitation | |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, |
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
Thu Aug 9 07:14:52 UTC 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
root@ubuntu-master01:/home/ubuntu# kubeadm init | |
[init] Using Kubernetes version: v1.9.4 | |
[init] Using Authorization modes: [Node RBAC] | |
[preflight] Running pre-flight checks. | |
[WARNING FileExisting-crictl]: crictl not found in system path | |
[certificates] Generated ca certificate and key. | |
[certificates] Generated apiserver certificate and key. | |
[certificates] apiserver serving cert is signed for DNS names [ubuntu-master01 kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 172.18.10.84] | |
[certificates] Generated apiserver-kubelet-client certificate and key. | |
[certificates] Generated sa key and public key. |
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
sa-learn -D --ham /var/mail/fraction.jp/yuanying/.Junk.negative --dbpath /var/mail-state/lib-amavis/.spamassassin | |
sa-learn -D --spam /var/mail/fraction.jp/yuanying/.Junk.positive --dbpath /var/mail-state/lib-amavis/.spamassassin |
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 | |
IMAGE="gcr.io/google-containers/ubuntu-slim:0.14" | |
COMMAND="/bin/bash" | |
SUFFIX=$(date +%s | shasum | base64 | fold -w 10 | head -1 | tr '[:upper:]' '[:lower:]') | |
usage_exit() { | |
echo "Usage: $0 [-c command] [-i image] PVC ..." 1>&2 | |
exit 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
import openpyxl as px | |
import re | |
import os | |
import sys | |
import json | |
output = 'neutron-policy.xlsx' | |
translation_dict = { | |
'create': '作成', |
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
#cloud-config | |
--- | |
# Before commit any change please validate this file @ https://coreos.com/validate/ | |
# Set hostname | |
hostname: node111 | |
# Set SSH Key | |
ssh_authorized_keys: | |
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0ol7jQ4umQMrE1qtXnyeYk/23g6zVJyVPh0+rljElu/7zj6iJZtixxs+LebPH6mZP13RIGPP0GlrSXRVBj9F2pjb/Y/PMyHBq3+BMeiYhn6XmNMwtTK2O69vvFZQi0M3wTVSezP9OxxrPay+eCXkGVi8lnh6ZDMrvSKI2c5SQ7wFJfT/4XTxzcP2gsotRV0rzADie1EF4MYke+ZJuiwnrFbZpeogrNtSvivR4f/g0/fD8NOjCKgbk4uY//6YhEqNaGhm0wABKt0MtimmxLLe2kosoFS539t88y5tD4ispcxlOAtVKZEL1ogf0VRrcBWSTfIiJty5vw6aRTfoFwuzZ [email protected] |
NewerOlder