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
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
annotations: | |
rbac.authorization.kubernetes.io/autoupdate: "true" | |
labels: | |
kubernetes.io/bootstrapping: rbac-defaults | |
name: pilipa:dev | |
rules: | |
- apiGroups: |
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
{ | |
"inputs": [ | |
{ | |
"detail": { | |
"ExcludeLabel": {}, | |
"IncludeEnv": { | |
"app": "nginx-ingress" | |
}, | |
"IncludeLabel": {}, | |
"Stderr": false |
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
{ | |
"log": { | |
"version": "1.2", | |
"creator": { | |
"name": "WebInspector", | |
"version": "537.36" | |
}, | |
"pages": [], | |
"entries": [ | |
{ |
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
docker run -d --restart always --name dingtalk-proxy -p 55555:1080 -e PROXY_USER=user -e PROXY_PASSWORD=passw0rd serjs/go-socks5-proxy |
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
export AWS_DEFAULT_PROFILE=account_a(has route53) | |
aws route53 create-vpc-association-authorization --hosted-zone-id zoneid --vpc VPCRegion=ap-southeast-1,VPCId=vpc-xxxx | |
export AWS_DEFAULT_PROFILE=account_b(has vpc-xxxx) | |
aws route53 associate-vpc-with-hosted-zone --hosted-zone-id zoneid --vpc VPCRegion=ap-southeast-1,VPCId=vpc-xxxx |
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
#!/bin/bash -x | |
add-apt-repository ppa:plushuang-tw/uget-stable -y | |
apt install aria2 parallel iotop tmux python3-pip -y | |
pip3 install awscli --upgrade --user | |
export AWS_DEFAULT_REGION=ap-northeast-1 | |
SECONDS=0 | |
seq 1 5 | parallel --will-cite -j 5 'url=$(aws s3 presign s3://<your bucket>/test-files/file-{});aria2c --file-allocation=none -c -x 4 -s 4 -d /dev -o null $url' | |
duration=$SECONDS | |
RESULT=result-$(curl http://169.254.169.254/latest/meta-data/instance-type)-$(curl http://169.254.169.254/latest/meta-data/instance-id)-seconds-${duration} | |
touch /tmp/$RESULT |
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
# aws ec2 alias or quick functions | |
alias ec2-instance-list="aws ec2 describe-instances --output table --query 'Reservations[*].Instances[*].{Instance:InstanceId,Type:InstanceType,AZ:Placement.AvailabilityZone,Name:Tags[?Key==\`Name\`]|[0].Value,Dns:NetworkInterfaces[0].Association.PublicDnsName,State:State.Name}' --filters 'Name=instance-state-code,Values=16'" | |
alias ec2-terminate-instance="aws ec2 terminate-instances --instance-ids" | |
function _ec2-launch { | |
templateName='my-instances-launch-template' | |
amiid="$1" | |
if [ -z "$amiid" ]; then | |
echo 'AMI is missing' | |
return |
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
--- | |
apiVersion: eksctl.io/v1alpha5 | |
kind: ClusterConfig | |
metadata: | |
name: cluster-3 | |
region: cn-northwest-1 | |
nodeGroups: | |
- name: ng2-private |
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
{ | |
"Comment": "Delete CNAME record in route 53 hosted zone", | |
"Changes": [ | |
{ | |
"Action": "DELETE", | |
"ResourceRecordSet": { | |
"Name": "pypi.mirrors.testtest.vme360.com", | |
"Type": "CNAME", | |
"TTL": 300, | |
"ResourceRecords": [ |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "Stmt1584020444106", | |
"Action": [ | |
"serverlessrepo:GetApplication", | |
"serverlessrepo:GetApplicationPolicy", | |
"serverlessrepo:GetCloudFormationTemplate", | |
"serverlessrepo:ListApplicationDependencies", |