Skip to content

Instantly share code, notes, and snippets.

View clarencetw's full-sized avatar
🏠
Working from home

Clarence clarencetw

🏠
Working from home
View GitHub Profile
@clarencetw
clarencetw / goaccessreport
Created July 27, 2019 08:02
goaccess-install-and-use-5
#!/bin/bash
zcat -f /var/log/nginx/access.log* | goaccess -a -d -p /etc/goaccess.conf -o /var/www/goaccess/report.html
@clarencetw
clarencetw / goaccess-install-and-use-6
Last active July 27, 2019 08:06
goaccess-install-and-use-6
$ zcat -f access.log* | goaccess -a
@clarencetw
clarencetw / amazon-ec2-instance-connect-install-and-use-1
Created July 27, 2019 14:49
amazon-ec2-instance-connect-install-and-use-1
ssh -i my_ec2_private_key.pem ubuntu@ec2-a-b-c-d.us-west-2.compute.amazonaws.com
sudo apt-get update
sudo apt-get install ec2-instance-connect
@clarencetw
clarencetw / amazon-ec2-instance-connect-install-and-use-2
Created July 27, 2019 14:49
amazon-ec2-instance-connect-install-and-use-2
ssh -i my_ec2_private_key.pem ec2-user@ec2-a-b-c-d.us-west-2.compute.amazonaws.com
sudo yum update
sudo yum install ec2-instance-connect
@clarencetw
clarencetw / amazon-ec2-instance-connect-install-and-use-3
Created July 27, 2019 14:49
amazon-ec2-instance-connect-install-and-use-3
pip install ec2instanceconnectcli
@clarencetw
clarencetw / carbon.sh
Last active July 27, 2019 14:57
carbon-iframe-appears-carbon-now-sh-rejects-connection-cause-analysis-and-carbon-erection-teaching
git clone https://github.com/dawnlabs/carbon
cd carbon
npm install /* install 安裝 */
npm run build /* build 編譯 */
npm start /* start 開啟服務 */
@clarencetw
clarencetw / sample-1.sh
Created July 27, 2019 15:10
use-dig-command-to-understand-the-characteristics-of-aws-vpc-in-dns
dig +nocmd +noall +answer +ttlid a google.com
@clarencetw
clarencetw / npmrc
Last active July 27, 2019 15:26
github-package-registry-beta
//npm.pkg.github.com/:_authToken=PERSONAL-ACCESS-TOKEN
@Codertocat:registry=https://npm.pkg.github.com/
@clarencetw
clarencetw / bash
Last active July 27, 2019 15:30
curl-details-tcp-ssl-connection-time
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
@clarencetw
clarencetw / sample.sh
Created July 27, 2019 15:33
internal-domain-mdnsmulticast-dns
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>