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
sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig | |
sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target | |
exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME |
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
const TimerComponent = (props) => { | |
const [time, setTime] = useState((new Date()).toLocaleString('en')); | |
setInterval(() => { | |
setTime((new Date()).toLocaleString('en')); | |
}, 1000); | |
}; | |
const NameComponent = (props) => { | |
const [name, setName] = useState("Peter"); |
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
From the codes I wrote 3 years ago. Find code from my cloud storage. | |
interface KeyValue1 { | |
[key: string]: string[]; | |
} | |
const test1: KeyValue1 = { | |
"key1": ["value1"], | |
"key2": ["value2"], | |
}; | |
console.log(JSON.stringify(test1)); |
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
https://github.com/tensorflow/tensorflow/issues/20500 |
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
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
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
$ kubectl label node apseo-fo4-t05.ea.com node-role.kubernetes.io/util=true | |
nodeSelector: | |
node-role.kubernetes.io/util: "true" |
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
openssl rsa -in ssl.key.encrypted -out ssl.key.decrypted |
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
$ docker inspect k8s_kube-apiserver_kube-apiserver-yuyi_kube-system_c162395858e62bdd4565683dda93d7f9_0 | grep port | |
"--insecure-port=0", | |
"--secure-port=6443", | |
"--insecure-port=0", | |
"--secure-port=6443", | |
curl http://localhost:6443 | |
curl --insecure https://localhost:6443/api/v1 |
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
$ docker inspect k8s_kube-apiserver_kube-apiserver-yuyi_kube-system_c162395858e62bdd4565683dda93d7f9_0 | grep port | |
"--insecure-port=0", | |
"--secure-port=6443", | |
"--insecure-port=0", | |
"--secure-port=6443", | |
curl http://localhost:6443 | |
curl --insecure https://localhost:6443/api/v1 |
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
https://github.com/kubernetes/dashboard | |
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml | |
$ kubectl -n kube-system describe secrets `kubectl -n kube-system get secrets | awk '/clusterrole-aggregation-controller/ {print $1}'` | awk '/token:/ {print $2}' | |
$ kubectl proxy | |
$ kubectl get svc -n kube-system | |
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE | |
kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP 39m | |
kubernetes-dashboard ClusterIP xxx.xxx.xxx.xxxx <none> 443/TCP 31m |
NewerOlder