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
brew install php |
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
cd "C:\Program Files\Amazon\AmazonCloudWatchAgent" | |
PS C:\Program Files\Amazon\AmazonCloudWatchAgent> .\amazon-cloudwatch-agent-ctl.ps1 -a fetch-config -m ec2 -c file:"C:\Program Files\Amazon\AmazonCloudWatchAgent\config.json" -s # 重新啟動 CloudWatch Agent 並且使用本地 json 設定檔 | |
PS C:\Program Files\Amazon\AmazonCloudWatchAgent> .\amazon-cloudwatch-agent-ctl.ps1 -a start # 開啟 | |
PS C:\Program Files\Amazon\AmazonCloudWatchAgent> .\amazon-cloudwatch-agent-ctl.ps1 -a stop # 停止 | |
PS C:\Program Files\Amazon\AmazonCloudWatchAgent> .\amazon-cloudwatch-agent-ctl.ps1 -a status # 檢查狀態 |
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
route53 IN NS ns-108.awsdns-13.com. | |
route53 IN NS ns-1626.awsdns-11.co.uk. | |
route53 IN NS ns-1065.awsdns-05.org. | |
route53 IN NS ns-1008.awsdns-62.net. |
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
timestamp=$(date +%s) | |
authorization=token | |
curl -v -H "Authorization: Bearer ${authorization}" -H 'content-type: application/x-www-form-urlencoded' -d "timestamp=${timestamp}" -X POST https://clarence.tw/api |
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
clarence:~$ curl -i https://api.github.com/users/octocat/orgs | |
HTTP/1.1 200 OK | |
Server: GitHub.com | |
Date: Thu, 08 Nov 2018 06:49:41 GMT | |
Content-Type: application/json; charset=utf-8 | |
Content-Length: 5 | |
Status: 200 OK | |
X-RateLimit-Limit: 60 | |
X-RateLimit-Remaining: 46 | |
X-RateLimit-Reset: 1541661588 |
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
sudo apt-get update && sudo apt-get upgrade -y linux-aws |
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
clarence$ kubectl get all | |
NAME READY STATUS RESTARTS AGE | |
pod/mysql-0000000000-AAAAA 1/1 Running 0 6d | |
pod/wordpress-0000000000-AAAAA 1/1 Running 0 6d | |
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE | |
service/kubernetes ClusterIP 10.0.0.0 <none> 443/TCP 1y | |
service/mysql ClusterIP 10.0.0.0 <none> 3306/TCP 1y | |
service/wordpress LoadBalancer 10.0.0.0 35.197.0.0 80:31737/TCP 1y |
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
clarence~: dig @8.8.8.8 blog.clarence.tw | |
; <<>> DiG 9.10.6 <<>> @8.8.8.8 blog.clarence.tw | |
; (1 server found) | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43396 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1 | |
;; OPT PSEUDOSECTION: |
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
clarence~: python -m SimpleHTTPServer 80 | |
clarence~: curl http://clarence.local/ | |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html> | |
<title>Directory listing for /</title> | |
<body> | |
<h2>Directory listing for /</h2> | |
<hr> | |
<ul> | |
</ul> |
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
clarence:~$ curl https://blog.clarence.tw | |
clarence:~$ curl -o /dev/null https://blog.clarence.tw | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 32550 0 32550 0 0 27874 0 --:--:-- 0:00:01 --:--:-- 27892 | |
clarence:~$ curl -w "@curl-format.txt" https://blog.clarence.tw | |
clarence:~$ curl -w "@curl-format.txt" -o /dev/null https://blog.clarence.tw |