Skip to content

Instantly share code, notes, and snippets.

@quant-daddy
quant-daddy / graphql-contract-test.md
Created March 1, 2020 04:33
How to do Pact contract testing between Apollo client and Graphql server

Pact Contract testing for GraphQL

Pact contract test consists of a consumer and a provider. In our case we are going to use a Apollo client consumer and the provider will a graphql server.

For the consumer testing, a graphql contract look like this:

// This is a apollo query; it can be mutation as well

const GET_USER_PROFILE = gql`
@quant-daddy
quant-daddy / https_jenkins.md
Created February 25, 2020 00:01
Setup https for jenkins using let's encrypt for free.

First install certbot: (instrcution fotr ubuntu below)

sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx

We are going to use this command to issue the certificate:

@quant-daddy
quant-daddy / build.log
Created June 12, 2018 21:25
packer ssh private repo failing
1528837782,,ui,message, amazon-ebs: Processing triggers for libc-bin (2.23-0ubuntu10) ...
1528837782,,ui,message, amazon-ebs: Processing triggers for systemd (229-4ubuntu21.2) ...
1528837782,,ui,message, amazon-ebs: Processing triggers for ureadahead (0.100.0-19) ...
1528837782,,ui,message, amazon-ebs: Processing triggers for ufw (0.35-0ubuntu2) ...
1528837783,,ui,message, amazon-ebs: # github.com:22 SSH-2.0-libssh_0.7.0
1528837783,,ui,message, amazon-ebs: # github.com:22 SSH-2.0-libssh_0.7.0
1528837783,,ui,message, amazon-ebs: # github.com:22 SSH-2.0-libssh_0.7.0
1528837783,,ui,message, amazon-ebs: Cloning into '/app'...
1528837783,,ui,message, amazon-ebs: Host key verification failed.
1528837783,,ui,message, amazon-ebs: fatal: Could not read from remote repository.