# kill all processes listening on port 2181
lsof -i :2181 | tail -n+2 | awk '{ print $2 }' | xargs kill -9grit.commit(g -> g .message("") .author() );
This file contains hidden or 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 com.fasterxml.jackson.core.JsonProcessingException; | |
| import com.fasterxml.jackson.databind.JsonNode; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import com.fasterxml.jackson.databind.PropertyNamingStrategy; | |
| import com.fasterxml.jackson.databind.node.ArrayNode; | |
| import org.apache.kafka.common.errors.SerializationException; | |
| import org.apache.kafka.common.serialization.Serializer; | |
| import org.apache.kafka.connect.data.Timestamp; | |
| import java.lang.reflect.Field; |
This file contains hidden or 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 class PhoneNumber { | |
| private final String areaCode; | |
| private final String phoneNumber; | |
| private PhoneNumber(String areaCode, String phoneNumber) { | |
| this.areaCode = areaCode; | |
| this.phoneNumber = phoneNumber; | |
| } | |
| public static PhoneNumber create(String areaCode, String phoneNumber) { |
This file contains hidden or 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
| def pipe(fn, ...fns) { | |
| return { | |
| fns.inject(fn(it)) { acc, value -> | |
| value(acc) | |
| } | |
| } | |
| } |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| __sdk_local() { | |
| [[ ! -f .sdkrc ]] || return | |
| local line | |
| while IFS= read -r line; do | |
| local candidate=${line%=*} | |
| local version=${line#*=} |