Skip to content

Instantly share code, notes, and snippets.

View larrycai's full-sized avatar
💭
I may be slow to respond.

Larry Cai larrycai

💭
I may be slow to respond.
View GitHub Profile
@larrycai
larrycai / ipv6-httpd.py
Created August 24, 2022 06:15 — forked from akorobov/ipv6-httpd.py
quick ipv6 http server using python's SimpleHttpServer
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()
@larrycai
larrycai / tcp-services.yaml
Created October 26, 2020 07:33 — forked from chrisedrego/tcp-services.yaml
Ingress TCP Configuration for MYSQL
apiVersion: v1
data:
"3306": mysql/mysql-service:3306
kind: ConfigMap
metadata:
name: tcp-services
namespace: ingress-nginx
@larrycai
larrycai / mysql-ingress.yaml
Created October 26, 2020 07:33 — forked from chrisedrego/mysql-ingress.yaml
Ingress defintion for mysql
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
@larrycai
larrycai / Jenkinsfile
Created September 6, 2017 19:43 — forked from abayer/Jenkinsfile
An example Declarative Pipeline Jenkinsfile for Feb 15 2017 demo
// 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',
@larrycai
larrycai / hello2.py
Created December 16, 2012 15:56 — forked from anonymous/hello2.py
update the bug for passing parameter
#!/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>