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 socket | |
from BaseHTTPServer import HTTPServer | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
class MyHandler(SimpleHTTPRequestHandler): | |
def do_GET(self): | |
if self.path == '/ip': | |
self.send_response(200) | |
self.send_header('Content-type', 'text/html') | |
self.end_headers() |
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
apiVersion: v1 | |
data: | |
"3306": mysql/mysql-service:3306 | |
kind: ConfigMap | |
metadata: | |
name: tcp-services | |
namespace: ingress-nginx |
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
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
annotations: | |
kubernetes.io/ingress.class: nginx | |
ingress.kubernetes.io/force-ssl-redirect: "true" | |
nginx.ingress.kubernetes.io/server-alias: mysql.<YOUR_DOMAIN>.com | |
labels: | |
app: mysql | |
name: mysql |
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
// A Declarative Pipeline is defined within a 'pipeline' block. | |
pipeline { | |
// agent defines where the pipeline will run. | |
agent { | |
// This also could have been 'agent any' - that has the same meaning. | |
label "" | |
// Other possible built-in agent types are 'agent none', for not running the | |
// top-level on any agent (which results in you needing to specify agents on | |
// each stage and do explicit checkouts of scm in those stages), 'docker', |
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/env python | |
""" | |
hello2.py hello world sample | |
Usage: hello2.py [options] | |
Options: | |
-m messages message list, separare by ',' | |
-h this help | |
Mail bug reports and suggestion to : Larry Cai <larry.caiyu AT gmail.com> |