Skip to content

Instantly share code, notes, and snippets.

Dominik Dary DominikDary

Block or report user

Report or block DominikDary

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bernadinm
bernadinm / Master Replacement with Static List.md
Last active Jul 1, 2019
Procedure to Replace Single Master with Master Discovery Set to Static
View Master Replacement with Static List.md

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.

View split.py
# 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
@bethesque
bethesque / a_readme.md
Last active Dec 16, 2019
Using Pact with non-HTTP services
View a_readme.md

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

@bagdemir
bagdemir / AdobeLogo
Created May 21, 2015
Adobe ASCII Art Logo in Red for MOTD
View AdobeLogo
@lukeis
lukeis / bookmarklet.md
Last active Aug 29, 2015
Selenium-Close-Non-Issue
View bookmarklet.md
javascript:(function(){$('#new_comment_field')[0].value='This is a question rather than an issue. Please send questions to the [selenium user group](https://groups.google.com/forum/#!forum/selenium-users)\n\nFor issues please provide a [concise reproducible test case](http://sscce.org/) and describe what results you are seeing and what results you expect.\n\nSee [CONTRIBUTING.md](https://github.com/SeleniumHQ/selenium/blob/master/CONTRIBUTING.md#issue-contributions)';$('button[name="comment_and_close"]').click()})()
@kalenwatermeyer
kalenwatermeyer / JenkinsBuildStatusHistory.md
Last active Mar 10, 2020
Jenkins - Build status history for multiple jobs
View JenkinsBuildStatusHistory.md

Jenkins Build Status History - screenshot

Description

The Jenkins Build Status History widget periodically fetches a snapshot of build status information for a specified list of jobs on a Jenkins CI server.

As time progresses, new build status samples are added to the right, while older samples are removed from the left. This view allows you to quickly see the health of your jobs as well as any time trends.

Calls are made to the Jenkins API to retrieve the name and color properties of listed jobs in a JSON form. The color of a given job represents its current build status (i.e. "blue" => successful build, "red" => failing build and so on).

@cridenour
cridenour / gist:74e7635275331d5afa6b
Last active May 18, 2020
Setting up Vim as your Go IDE
View gist:74e7635275331d5afa6b

Setting up Vim as your Go IDE

The final IDE

Intro

I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.

Getting Started

I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.

@nwinkler
nwinkler / pom.xml
Last active Mar 31, 2020
Combining the git-flow branching model and the Maven Release Plugin to play nice. Based on info found here: http://vincent.demeester.fr/2012/07/maven-release-gitflow/
View pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>group</groupId>
<artifactId>dummy</artifactId>
<name>Dummy Project</name>
<version>1.0.12</version>
<packaging>pom</packaging>
<scm>
<connection>scm:git:https://......</connection>
<tag>HEAD</tag>
@DominikDary
DominikDary / selendroid-repl.adoc
Last active Aug 29, 2015
Short article on using python to build a repl for selendroid.
View selendroid-repl.adoc

selendroid repl

This document describes how to setup a repl for selendroid based on Python. It uses the Selenium Python bindings.

Overview

  • Installion and Configuration

  • Use the repl with selendroid

@DominikDary
DominikDary / 10-18.java
Created Jan 29, 2014
configure android web view proxy
View 10-18.java
//Source: http://stackoverflow.com/a/18453384
public static boolean setProxy(WebView webview, String host, int port) {
// 3.2 (HC) or lower
if (Build.VERSION.SDK_INT <= 13) {
return setProxyUpToHC(webview, host, port);
}
// ICS: 4.0
else if (Build.VERSION.SDK_INT <= 15){
return setProxyICS(webview, host, port);
}
You can’t perform that action at this time.