Skip to content

Instantly share code, notes, and snippets.

View Reasno's full-sized avatar

谷溪 Reasno

View GitHub Profile
@jabad21
jabad21 / backendServicePipeline.groovy
Last active October 9, 2019 23:05
example-pipeline-on-jenkins-shared-library
def call(body) {
def pipelineParams = [:]
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = pipelineParams
body()
pipeline {
agent {
label 'builder-backend'
}
@marwei
marwei / how_to_reset_kafka_consumer_group_offset.md
Created November 9, 2017 23:39
How to Reset Kafka Consumer Group Offset

Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups command.

  1. List the topics to which the group is subscribed
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describe

Note the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.

  1. Reset the consumer offset for a topic (preview)
@harshavardhana
harshavardhana / nginx-minio-static.md
Last active April 19, 2024 09:33 — forked from koolhead17/gist:4b8dd8d95ec86368634693cf9ad9391c
How to configure static website using Nginx with MinIO ?

How to configure static website using Nginx with MinIO ?

1. Install nginx

2. Install minio

3. Install mc client

4. Create a bucket:

$ mc mb myminio/static
Bucket created successfully ‘myminio/static’.
@dolphin836
dolphin836 / rsa2.php
Created May 24, 2017 02:54
[PHP RSA2 签名算法] #tags:签名,RSA2,算法
class Rsa2
{
private static $PRIVATE_KEY = 'rsa_private_key.pem';
private static $PUBLIC_KEY = 'rsa_public_key.pem';
/**
* 获取私钥
* @return bool|resource
*/
private static function getPrivateKey()
@bsingr
bsingr / nginx.conf
Last active October 23, 2023 05:46
Shadow traffic duplication reverse proxy
daemon off;
error_log /dev/stderr warn;
worker_processes 4;
events {
worker_connections 1024;
multi_accept on;
}
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@TheDauthi
TheDauthi / jenkins-recursive-delete.groovy
Last active May 15, 2021 09:16
Delete all Jenkins builds recursively older than a certain count
import hudson.model.*
keepCount = 10
// Some plugins - like the CB Folders - don't actually have builds. Filter them
jobs = Hudson.instance.getAllItems().findAll {
job -> job.hasProperty("lastBuild")
}
for(job in jobs)
{
lastBuildNumber = job.lastBuild.number