Skip to content

Instantly share code, notes, and snippets.

View DominikDary's full-sized avatar

Dominik Dary DominikDary

View GitHub Profile
@lukeis
lukeis / bookmarklet.md
Last active August 29, 2015 14:17
Selenium-Close-Non-Issue

javascript:(function(){$('#new_comment_field')[0].value='This is a question rather than an issue. Please send questions to the selenium user group\n\nFor issues please provide a concise reproducible test case and describe what results you are seeing and what results you expect.\n\nSee CONTRIBUTING.md';$('button[name="comment_and_close"]').click()})()

@reevik
reevik / AdobeLogo
Created May 21, 2015 23:45
Adobe ASCII Art Logo in Red for MOTD
@bethesque
bethesque / a_readme.md
Last active October 21, 2023 16:03
Using Pact with non-HTTP services

When you declare a request and response using the traditional Pact DSL, ("uponReceiving" and "willRespondWith") you're building a structure that has three purposes -

  1. it provides the concrete example request and response used in the tests
  2. it specifies the contents of the contract which...
  3. defines how to validate the the actual request/response against the expected request/response

The three different uses of this structure are hidden from you when using HTTP Pact because the mock service handles numbers 1 & 2 in the consumer tests, and the verification task handles number 3 for you in the provider tests. When using Pact in a non-HTTP scenario, there is no nice neat protocol layer to inject the code to do this for you, so you have to explicitly do each step.

The file expected_data_from_collector.rb declares an object graph using the Pact DSL. This is going to be used to create the concrete example and the contract. This could be declared inline, but for easier maintenance, and to allow the contr

# pip install pypdf2
# Thanks to sphilp for updates
########
# USAGE:
########
# You will need to enter your email creds so you can receive the bonus statements
# which you can then review, edit, and forward (sending directly could be dangerous)
#
# This is pigging backing on gmail's API to send the email to yourself
@bernadinm
bernadinm / Master Replacement with Static List.md
Last active March 28, 2021 00:17
Procedure to Replace Single Master with Master Discovery Set to Static

Master Replacement with Static List Procedure

Objective: WIth this procedure, we want to replace node 172.31.1.23 with node 172.31.7.30. Also, it is required that we change exhibitor_zk_path to something unique in order for this procedure to work.

Begin

Configure the bootstrap node with the modified config.yaml that has a change to a new exhibitor_zk_path along with the master node that you want to replace for master_list

Important NOTE: The most important piece is exhibitor_storage_backend: zookeeper and exhibitor_zk_path: "/masterip-change-20170127". You must set exhibitor_zk_path to be something unique otherwise your cluster wont converge.

@jamct
jamct / docker-compose.yml
Created August 9, 2024 09:37
Run evcc in docker
services:
evcc:
command:
- evcc
container_name: evcc
image: evcc/evcc:latest
ports:
- 7070:7070/tcp
- 8887:8887/tcp
- 7090:7090/udp