通过第一篇《使用树莓派3B打造超强路由之一:初装》的努力,树莓派3B已经可以作为一台超低能耗、随身携带的开发用服务器来使用了。但这对于目标——打造超强路由而言,才刚刚开始。接下来,我们需要将其打磨成一台基本的无线路由器。
WARNING 本文所有指令均仅供参考,切勿无脑复制粘贴!
| # Content of the file /etc/logstash/conf.d/auditd.conf | |
| # Tested on the CentOS 7 auditspd logs forwarded to logstash via rsyslog | |
| input { | |
| syslog { | |
| type => AUDITD | |
| port => xxxx | |
| host => "xxx.xxx.xxx.xxx" | |
| } | |
| } |
| #!/bin/bash | |
| # To avoid doing things like putting your mysql password on the cli which is not secure | |
| # Use mysql config editor http://dev.mysql.com/doc/refman/5.6/en/mysql-config-editor.html | |
| database_name=ifrs17_per_biz2 | |
| for table in $(mysql --login-path=mylogins -D $database_name -Bse "show tables"); | |
| do mysql --login-path=mylogins -D $database_name -Bse "analyze table $table"; | |
| done |
通过第一篇《使用树莓派3B打造超强路由之一:初装》的努力,树莓派3B已经可以作为一台超低能耗、随身携带的开发用服务器来使用了。但这对于目标——打造超强路由而言,才刚刚开始。接下来,我们需要将其打磨成一台基本的无线路由器。
WARNING 本文所有指令均仅供参考,切勿无脑复制粘贴!
| import hashlib | |
| import hmac | |
| import base64 | |
| def make_digest(message, key): | |
| key = bytes(key, 'UTF-8') | |
| message = bytes(message, 'UTF-8') | |
| from sys import argv | |
| from base64 import b64encode | |
| from datetime import datetime | |
| from Crypto.Hash import SHA, HMAC | |
| def create_signature(secret_key, string): | |
| """ Create the signed message from api_key and string_to_sign """ | |
| string_to_sign = string.encode('utf-8') | |
| hmac = HMAC.new(secret_key, string_to_sign, SHA) | |
| return b64encode(hmac.hexdigest()) |
| heat_template_version: 2015-04-30 | |
| description: Create a new Project. Assign a user and user-role pair. | |
| parameters: | |
| demo_project_name: | |
| type: string | |
| description: project name | |
| demo_user_role: | |
| type: string |
| nova flavor-list | grep True | awk -F "|" '{print "nova flavor-create --ephemeral 1 --swap 0 --rxtx-factor 1.0 --is-public True" $3 $2 $4 $5 $8";"}' | sed -e 's/ / /g' |
| kind: StorageClass | |
| apiVersion: storage.k8s.io/v1beta1 | |
| metadata: | |
| name: fast | |
| provisioner: kubernetes.io/gce-pd | |
| parameters: | |
| type: pd-ssd |