Skip to content

Instantly share code, notes, and snippets.

View alexec's full-sized avatar
😀

Alex Collins alexec

😀
View GitHub Profile
@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)
@kobake
kobake / git-commit-size.sh
Created November 5, 2017 13:42
Calculate size of a git commit object.
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: git-commit-size.sh <commit hash>" 1>&2
exit 1
fi
HASH=$1
ITEM_LIST="`git diff-tree -r -c -M -C --no-commit-id $HASH`"
@nilsmagnus
nilsmagnus / kafka_consumer.go
Created February 15, 2017 08:04
Example of go consuming from kafka, using the shopify/sarama library
package main
import (
"fmt"
"github.com/Shopify/sarama"
"os"
"os/signal"
"strings"
)
@teknoraver
teknoraver / unixhttpc.go
Last active July 8, 2024 10:12
HTTP over Unix domain sockets in golang
package main
import (
"context"
"flag"
"fmt"
"io"
"net"
"net/http"
"os"
@mikechau
mikechau / countdown.coffee
Created May 3, 2013 21:26
Dashing Countdown Customized for Stock Market
#a bunch of dirty hacks right now to the original countdown widget
#original: https://gist.github.com/ruleb/5353056
class Dashing.Countdown extends Dashing.Widget
ready: ->
setInterval(@startCountdown, 500)
startCountdown: =>
count_to_close = true
@EHadoux
EHadoux / Readme.md
Last active May 18, 2016 10:07
Sonar Widget for Dashing

Description

This is a dashing widget intended to show metrics from a sonar repository.

Usage

This widget currently uses the list widget as a view. You just have to add this snippet to your dashboard:

@leifg
leifg / README.md
Created December 6, 2012 15:48
Jenkins Dashboard using dashing

This is an example of adding Jenkins build status to a [dashing-dashboard](https://github.com/Shopify/dashing

If a job is running, the widget will have a grey background. If a job succeeded at its last run, it will have a green background. If a job failed at its last run, it will have a red background.

Requirements: