Skip to content

Instantly share code, notes, and snippets.

View maroda's full-sized avatar

Matt Davis maroda

View GitHub Profile
P 16
R 18 34
O 15 49
S 19 68 1:08
W 23 91 1:31
E 05 96 1:36
L 12 108 1:48
L 12 120 2:00
120 136 2:16
@maroda
maroda / maindefault.md
Last active June 26, 2020 18:22
Change GitHub default "Master" branch to "Main"

For those who would like to change the default master branch in GitHub to something else, here using main instead:

  1. Make sure you're up-to-date: git checkout master; git fetch; git pull
  2. Rename the branch: git branch -m main
  3. Push the change: git push -u origin main
  4. No PR is needed
  5. In the GitHub UI for the REPO being changed: Settings → Branches → Default branch
  6. Select main from the drop-down menu, click Update
  7. Browse to https://github.com/USER/REPO/branches
  8. Click the red trashcan next to master
@maroda
maroda / keybase.md
Created August 17, 2018 02:16
keybase.md

Keybase proof

I hereby claim:

  • I am maroda on github.
  • I am craque (https://keybase.io/craque) on keybase.
  • I have a public key ASDMgf9R9CH8tI0kaevNbiDPeZyQreemmo4HoXDnjZllkQo

To claim this, I am signing this object:

$ backplane help login
usage: backplane login
Login authenticates a user to make calls to the Backplane API.
Login will open a web browser on https://www.backplane.io/token.
Copy the token from the web page and paste it at the login prompt
in your terminal to authenticate via the CLI.
Login stores your token in ~/.netrc.
$ backplane shape dub.isochron.us route0000=0 route0001=50 route0002=50
Endpoint Owner RouteID Weight LabelSelector
-------- ----- ------- ------ -------------
dub.isochron.us maroda route0000 0 "env=prod,site=www.isochron.us,version=v1"
dub.isochron.us maroda route0001 50 "env=prod,site=www.isochron.us,version=v2"
dub.isochron.us maroda route0002 50 "env=prod,site=www.isochron.us,version=v3"
$ backplane list backends
Endpoint Owner RouteID Weight RPS State Location Labels
rational-giraffe-2.backplaneapp.io maroda route0000 100 0 ready US-CA "endpoint=rational-giraffe-2.backplaneapp.io,release=v1,id=139484871ae22af4"
dub.isochron.us maroda route0000 100 0 ready US-CA "env=prod,site=www.isochron.us,version=v1,id=8b2753b0704a0bd4"
dub.isochron.us maroda route0001 0 0 ready US-MA "env=prod,site=www.isochron.us,version=v2,id=ccbb2e647c03ebc3"
dub.isochron.us maroda route0002 0 0 ready US-MA "env=prod,site=www.isochron.us,version=v3,id=04b35d6ba09a6cb4"
$ backplane list routes
Endpoint Owner RouteID Weight LabelSelector
rational-giraffe-2.backplaneapp.io maroda route0000 100 "endpoint=rational-giraffe-2.backplaneapp.io,release=v1"
dub.isochron.us maroda route0000 100 "env=prod,site=www.isochron.us,version=v1"
dub.isochron.us maroda route0001 0 "env=prod,site=www.isochron.us,version=v2"
dub.isochron.us maroda route0002 0 "env=prod,site=www.isochron.us,version=v3"
$ backplane route dub.isochron.us "site=www.isochron.us, version=v2, env=prod"
Endpoint RouteID Weight LabelSelector
-------- ------- ------ -------------
dub.isochron.us route0001 0 env=prod,site=www.isochron.us,version=v2
$ backplane route dub.isochron.us "site=www.isochron.us, version=v3, env=prod"
Endpoint RouteID Weight LabelSelector
-------- ------- ------ -------------
dub.isochron.us route0002 0 env=prod,site=www.isochron.us,version=v3
resource "aws_route53_record" "dub" {
zone_id = "Z18WO5VD3QY05U"
name = "dub.isochron.us"
type = "CNAME"
ttl = "6"
records = ["cname.backplane.io"]
}
$ backplane connect "env=prod,site=www.isochron.us,version=v1" http://www.isochron.us
labels: env=prod,site=www.isochron.us,version=v1
healthcheck timeout: 1s
Connecting to the Backplane network...
state changed to "notready"
waiting for backend to become available at: http://www.isochron.us
state changed to "ready"
Successfully connected to the Backplane network