Instantly share code, notes, and snippets.

View istio-java-api-48
/home/gandrian/.sdkman/candidates/java/8.0.181-zulu/bin/java -ea -Didea.test.cyclic.buffer.size=1048576 -javaagent:/home/gandrian/software/IntelliJ/idea-IU-183.2153.8/lib/idea_rt.jar=35895:/home/gandrian/software/IntelliJ/idea-IU-183.2153.8/bin -Dfile.encoding=UTF-8 -classpath /home/gandrian/software/IntelliJ/idea-IU-183.2153.8/lib/idea_rt.jar:/home/gandrian/software/IntelliJ/idea-IU-183.2153.8/plugins/junit/lib/junit-rt.jar:/home/gandrian/software/IntelliJ/idea-IU-183.2153.8/plugins/junit/lib/junit5-rt.jar:/home/gandrian/.sdkman/candidates/java/8.0.181-zulu/jre/lib/charsets.jar:/home/gandrian/.sdkman/candidates/java/8.0.181-zulu/jre/lib/ext/cldrdata.jar:/home/gandrian/.sdkman/candidates/java/8.0.181-zulu/jre/lib/ext/dnsns.jar:/home/gandrian/.sdkman/candidates/java/8.0.181-zulu/jre/lib/ext/jaccess.jar:/home/gandrian/.sdkman/candidates/java/8.0.181-zulu/jre/lib/ext/localedata.jar:/home/gandrian/.sdkman/candidates/java/8.0.181-zulu/jre/lib/ext/nashorn.jar:/home/gandrian/.sdkman/candidates/java/8.0.181-zulu/jre/
View simple pom
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>indy-maven-generate-repo-test</artifactId>
<version>1.0-SNAPSHOT</version>
View ocp-3.10-failure-inventory
```
[OSEv3:children]
masters
nodes
etcd
[OSEv3:vars]
ansible_user=root
public_ip_address=192.168.99.50
View ocp-3.10-failure
ASK [openshift_node : Ensure old system path is set] ****************************************************************************************************************************************************************************
changed: [192.168.99.50] => (item=/etc/origin/openvswitch)
changed: [192.168.99.50] => (item=/var/lib/kubelet)
changed: [192.168.99.50] => (item=/opt/cni/bin)
TASK [openshift_node : Pre-pull node system container image] *********************************************************************************************************************************************************************
fatal: [192.168.99.50]: FAILED! => {"msg": "The conditional check ''Pulling layer' in pull_result.stdout' failed. The error was: error while evaluating conditional ('Pulling layer' in pull_result.stdout): Unable to look up a name or access an attribute in template string ({% if 'Pulling layer' in pull_result.stdout %} True {% else %} False {% endif %}).\nMake sure your variable name does not contain invalid
View gist:85eb614336c77a8a3c4d57efb5a6d4e5
product:
name: spring-boot
abbreviation: spring-boot
stage: GA
issueTrackerUrl: http://issues.jboss.org/browse/SB
version: 1.5.10
milestone: DR20180330
group: spring-boot-1.5-all
defaultBuildParameters:
environmentId: 1
View default istio-inject configmap
apiVersion: v1
data:
config: |
policy: enabled
template: |-
initContainers:
- name: istio-init
image: docker.io/istio/proxy_init:0.6.0
args:
- "-p"
View openshift-3.7.ansible-rpm-error
PLAY [Create initial host groups for localhost] ********************************************************************************************
TASK [include_vars] ************************************************************************************************************************
ok: [localhost]
PLAY [Initialization Checkpoint Start] *****************************************************************************************************
skipping: no hosts matched
PLAY [Populate config host groups] *********************************************************************************************************
View introrx.md
View Kotlin List.collate
fun <T> List<T>.collate(size: Int, step: Int = size): List<List<T>> {
require(size >= 0) {"size must not be negative"}
require(step <= size) {"step must be at most equal to size"}
return collateRec(this, size, step, listOf())
}
private tailrec fun <T> collateRec(list : List<T>, size: Int, step: Int, accumulator: List<List<T>>) : List<List<T>> {
if(list.isEmpty()) {
return accumulator
View Kotlin Iterable.countBy extension
fun <T, M> Iterable<T>.countBy(transformer: (T) -> M) : Map<M, Int> {
val emptyMap = mapOf<M, Int>()
return this.fold(emptyMap) {accumulator, item ->
val transformedItem = transformer(item)
accumulator + Pair(transformedItem, accumulator.getOrElse(transformedItem, {0}) + 1)
}
}