This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tmpf=$(mktemp --tmpdir=$(dirname $1) -t) | |
jq . "$1" > "$tmpf" | |
mv -f "$tmpf" "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jq .request.bodyPatterns[].equalToJson {} | sed 's/\\"/"/g' - | sed 's/\\"/\"/g' - | sed 's/^"//g' - | sed 's/"$//g' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void testHashCode() { | |
ImmutableMap<String, Object> f1 = ImmutableMap.of("test", "test", "test2", "test2"); | |
ImmutableMap<String, Object> f2 = ImmutableMap.of("test2", "test2", "test3", "test3"); | |
assertFalse(f1.equals(f2)); | |
int hcf1 = f1.hashCode(); | |
int hcf2 = f2.hashCode(); | |
assertThat(hcf1, not(hcf2)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:8.9.4-alpine | |
RUN apk update | |
RUN apk upgrade | |
RUN apk add bash | |
RUN mkdir -p /opt/workspace | |
WORKDIR /opt/workspace | |
VOLUME /opt/workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.commons.lang3.RandomStringUtils; | |
import java.security.SecureRandom; | |
import java.util.Random; | |
import java.util.stream.IntStream; | |
import static java.util.stream.Collectors.joining; | |
public final class RandomUrlGenerator { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rxsearcher.searcher.kelkoo; | |
import com.google.common.util.concurrent.Uninterruptibles; | |
import io.reactivex.BackpressureStrategy; | |
import io.reactivex.Flowable; | |
import io.reactivex.disposables.Disposable; | |
import org.junit.Test; | |
import java.util.concurrent.TimeUnit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# sudo docker run -d -p 27017:27017 --net static_internal --ip 201.1.1.2 --name mongodb mongo | |
start() { | |
sudo docker start mongodb | |
} | |
stop() { | |
sudo docker stop mongodb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Person { | |
String name; | |
int age; | |
private Person(String name, int age) { | |
this.name = name; | |
this.age = age; | |
} | |
static PersonWaitingForName create() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.foxydeal.fdcinput; | |
/** | |
* Created by fschulz on 17.12.2015. | |
*/ | |
public class JsonObjectBuilder { | |
public static final String QUOTE = "\""; | |
private StringBuilder jsonString; | |
private int propertyCounter = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d | |
# fetch all repos | |
find . -maxdepth 1 -type d -exec echo {} \; -exec git --git-dir={}/.git --work-tree=$PWD/{} fetch \; | |
# prune all repos | |
find . -maxdepth 1 -type d -exec echo {} \; -exec git --git-dir={}/.git --work-tree=$PWD/{} remote prune origin \; |
NewerOlder