Edit: This list is now maintained in the rust-anthology repo.
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
version: "2" | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:5.5.1 | |
container_name: zookeeper | |
environment: | |
ZOOKEEPER_TICK_TIME: 2000 | |
ZOOKEEPER_CLIENT_PORT: 2181 | |
ports: | |
- "2181:2181" |
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 main | |
import ( | |
"fmt" | |
"github.com/confluentinc/confluent-kafka-go/kafka" | |
"github.com/google/uuid" | |
"log" | |
"os" | |
"strconv" | |
"time" |
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
#!groovy | |
import groovy.json.JsonOutput | |
import groovy.json.JsonSlurper | |
def label = "mypod-${UUID.randomUUID().toString()}" | |
podTemplate(label: label, yaml: """ | |
spec: | |
containers: | |
- name: mvn | |
image: maven:3.3.9-jdk-8-alpine |
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
@Library('github.com/triologygmbh/jenkinsfile@ad12c8a9') _ | |
pipeline { | |
agent { label 'docker' } // Require a build executor with docker | |
options { | |
disableConcurrentBuilds() | |
buildDiscarder(logRotator(numToKeepStr: '10')) | |
} |
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
# This tells kubecfg to read its config from the local directory | |
export KUBECONFIG=./kubeconfig | |
# Looking at the cluster | |
kubectl get nodes | |
kubectl get pods --namespace=kube-system | |
# Running a single pod | |
kubectl run --generator=run-pod/v1 --image=gcr.io/kuar-demo/kuard-amd64:1 kuard | |
kubectl get pods |
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 | |
# This is a very naive script, it doesn't do grouping and returns all branches | |
# I only really care about branches that have not seen commits in two months | |
# | |
# I am hoping to find some time to write a tool that can output these reports for me | |
# In the meantime, I am using this | |
echo "Merged branches" | |
for branch in `git branch -r --merged | grep -v HEAD`;do echo -e `git log --no-merges -n 1 --format="%ci, %cr, %an, %ae, " $branch | head -n 1` \\t$branch; done | sort -r |
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
//AND operation syntax | |
{ | |
"query":{ | |
"bool":{ | |
"must":[] | |
} | |
} | |
} | |
//OR operation syntax |
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
//match query retrieves all documents which has a title like 'Japan%' | |
{ | |
"_source":["id","name"], | |
"query":{ | |
"match":{ | |
"title": "Japan" | |
} | |
} | |
} |
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
{ | |
"_source":["id","name"], | |
"query":{ | |
"match_all":{} | |
} | |
} |
NewerOlder