Skip to content

Instantly share code, notes, and snippets.

View ctbarrett's full-sized avatar

Craig Barrett ctbarrett

View GitHub Profile
@ctbarrett
ctbarrett / .gitconfig
Created May 18, 2018 20:34
git aliases
# Aliases based on:
# http://durdn.com/blog/2012/11/22/must-have-git-aliases-advanced-examples/
[alias]
# History
l = log --oneline --decorate
lg = log --all --graph --decorate --oneline
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
lnc = log --pretty=format:"%h\\ %s\\ [%cn]"
ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative

Shard allocation / rebalancing

Exclude node(s) from shard routing

By ip address

curl -XPUT localhost:9200/_cluster/settings -d '{
  "transient" : {
    "cluster.routing.allocation.exclude._ip" : "10.0.0.1"
  }
@ctbarrett
ctbarrett / keybase.md
Last active March 14, 2017 05:19
Keybase proof

Keybase proof

I hereby claim:

  • I am ctbarrett on github.
  • I am ctbarrett (https://keybase.io/ctbarrett) on keybase.
  • I have a public key ASAHOZ9fKEsEB7rRTJRPD9alScLpbwJkfh9Dbs_DnNuDVgo

To claim this, I am signing this object:

@ctbarrett
ctbarrett / crash.log
Created February 21, 2017 19:12
Terraform aws_security_group output panic: strconv.Atoi: parsing "~3457728489": invalid syntax
2017/02/21 11:04:45 [INFO] Terraform version: 0.8.7
2017/02/21 11:04:45 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.8.7/bin/terraform", "plan"}
2017/02/21 11:04:45 [DEBUG] Detected home directory from env var: /Users/craig
2017/02/21 11:04:45 [DEBUG] Detected home directory from env var: /Users/craig
2017/02/21 11:04:45 [DEBUG] Attempting to open CLI config file: /Users/craig/.terraformrc
2017/02/21 11:04:45 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2017/02/21 11:04:45 [DEBUG] Detected home directory from env var: /Users/craig
2017/02/21 11:04:45 [DEBUG] New state was assigned lineage "367e389b-c78f-4e87-a8db-a5c2a30c233f"
2017/02/21 11:04:45 [TRACE] Graph after step *terraform.ConfigTransformerOld: