show dbs
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
log-queries | |
log-facility=/var/log/dnsmasq.log | |
no-resolv | |
server=8.8.4.4 | |
server=8.8.8.8 | |
address=/router/10.1.1.1 | |
address=/server/10.1.1.2 |
/*
https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object-acl.html
https://docs.aws.amazon.com/zh_cn/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html
https://github.com/awslabs/aws-go-wordfreq-sample/blob/master/cmd/uploads3/main.go
https://docs.aws.amazon.com/sdk-for-go/api/aws/
1. Create bucket in s3 & get the keys
- login to UI web aws s3 interface
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
consul agent -server -ui -bootstrap-expect=1 -data-dir=/var/lib/consul \ | |
-node=server -bind=0.0.0.0 -config-dir=/etc/consul.d -client=0.0.0.0 \ | |
-http-port=80 -domain=consul.itchy.local |
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
# Inspired by: https://stackoverflow.com/questions/42170380/how-to-add-users-to-kubernetes-kubectl | |
# this script creates a service account (user1) on a Kubernetes cluster (tested with AWS EKS 1.9) | |
# prereqs: a kubectl ver 1.10 installed and proper configuration of the heptio authenticator | |
# this has been tested on Linux in a Cloud9 environment (for MacOS the syntax may be slightly different) | |
************************************************** | |
******* Create an account ******* | |
************************************************** | |
# Create service account for user user1 | |
kubectl create sa user1 |
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
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod |
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
# Bash best practices and style-guide | |
Just simple methods to keep the code clean. | |
Inspired by [progrium/bashstyle](https://github.com/progrium/bashstyle) and [Kfir Lavi post](http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming/). | |
## Quick big rules | |
* All code goes in a function | |
* Always double quote variables |
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
require 'optparse' | |
require 'yaml' | |
require 'base64' | |
options = { | |
config_path: File.join(ENV['HOME'], '.kube', 'config'), | |
write_dir: File.join(ENV['HOME'], '.kube') | |
} | |
OptionParser.new do |opts| |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
NewerOlder