Skip to content

Instantly share code, notes, and snippets.

View ohumbel's full-sized avatar

Otmar Humbel ohumbel

View GitHub Profile
@ohumbel
ohumbel / JGroups.java
Last active October 24, 2019 04:55
JGroups connect to default channel
package st.extreme;
import org.jgroups.JChannel;
public class JGroups {
public static void main(String[] args) throws Exception {
try (JChannel channel = new JChannel()) {
channel.connect("testChannel");
System.out.println("Connected to a default test channel");
channel.disconnect();
def splitoutputofgitstatusz(self, line):
"""
:param line: the output line from the command 'git status -z'
:return: a list of all repository files with status changes
"""
repositoryfiles = []
entries = line.split(sep='\x00') # ascii 0 is the delimiter
for entry in entries:
entry = entry.strip()
if len(entry) > 0: