This file contains hidden or 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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment | |
spec: | |
replicas: 2 | |
template: | |
metadata: | |
labels: | |
app: nginx |
This file contains hidden or 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
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
name: node-exporter | |
spec: | |
template: | |
metadata: | |
labels: | |
app: node-exporter | |
annotations: |
This file contains hidden or 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
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: myjob | |
spec: | |
template: | |
metadata: | |
name: myjob | |
spec: | |
containers: |
This file contains hidden or 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
apiVersion: batch/v2alpha1 | |
kind: CronJob | |
metadata: | |
name: hello | |
spec: | |
schedule: "*/1 * * * *" | |
jobTemplate: | |
spec: | |
template: | |
spec: |
This file contains hidden or 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
apiVersion: apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: httpd | |
spec: | |
replicas: 3 | |
template: | |
metadata: | |
labels: | |
app: httpd |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
int main(int argc, char *argv[]) | |
{ | |
cout << "hello, world." << endl; | |
return 0; | |
} |
This file contains hidden or 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
// (A) | |
time.AfterFunc(5 * time.Minute, func() { | |
fmt.Printf("expired") | |
} | |
// (B) create a Timer object | |
timer := time.NewTimer(5 * time.Minute) | |
<-timer.C | |
fmt.Printf("expired") | |
This file contains hidden or 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
std::string src = " aa |b \t ccc[gg] "; | |
std::vector<std::string> list; | |
boost::split(list, std::string(src), boost::is_any_of(" \t,;\r\n|[]"), boost::token_compress_on); | |
if (list.size() <= 0) | |
return; | |
This file contains hidden or 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
var net = require('net'); | |
var port = 9922; | |
var host = '192.168.7.160'; | |
var client= new net.Socket(); | |
//创建socket客户端 | |
client.setEncoding('binary'); | |
//连接到服务端 | |
client.connect(port,host,function(){ | |
client.write('hello server'); |