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
user nginx; | |
worker_processes auto; | |
worker_rlimit_nofile 10240; | |
events {} | |
http { | |
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent"'; |
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
RABBITMQ_TLS_CA = './ca.pem' | |
RABBITMQ_TLS_CERT = './mq.pem' | |
RABBITMQ_TLS_KEY = './mq.key' | |
RABBITMQ_TLS_SERVER_NAME_INDICATION = 'mq.zamhuang.tw' | |
SSL_OPTIONS = "cacertfile=%s&certfile=%s&keyfile=%s&verify=verify_peer&server_name_indication=%s" % ( | |
RABBITMQ_TLS_CA, RABBITMQ_TLS_CERT, RABBITMQ_TLS_KEY, RABBITMQ_TLS_SERVER_NAME_INDICATION | |
) | |
conn_param = pika.URLParameters('amqps://mq:mqRabbitmq!PASS@172.88.0.2:5671?%s' % (SSL_OPTION)) | |
conn = pika.BlockingConnection(conn_param) |
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
context = ssl.create_default_context(cafile="./ca.pem") | |
context.load_cert_chain("./mq.pem", "./mq.key") | |
ssl_options = pika.SSLOptions(context, "mq.zamhuang.tw") | |
credential = pika.PlainCredentials('rabbitmq', 'rabbitmq!PASS') | |
conn_param = pika.ConnectionParameters(host="172.88.0.2", port=5671, ssl_options=ssl_options, credentials=credential) | |
conn = pika.BlockingConnection(conn_param) | |
mq_channel = conn.channel() | |
bind_queue(mq_channel, "q_msg", "q_msg.ticket") |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
"os" | |
"strconv" | |
) | |
var ( |
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
撰寫TodoList | |
Angular JS當作前端 | |
Node JS 當作後端 | |
Mongodb 當作Database |