Skip to content

Instantly share code, notes, and snippets.

View chrisfjones's full-sized avatar

Chris Jones chrisfjones

  • reclaim.ai
  • Portland
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)
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@bobby
bobby / datomic-helpers.clj
Created July 20, 2012 14:12
Some Datomic helpers I sometimes use with ring or pedestal-service apps
(ns datomic-helpers
(:require [datomic.api :as d]))
;;; Expose Datomic vars here, for convenience
;;; Ring middleware
(defn wrap-datomic
"A Ring middleware that provides a request-consistent database connection and
value for the life of a request."
@rkive
rkive / runChefSolo.sh
Created February 17, 2012 21:29
Remotely push chef-solo and run it.
#!/bin/bash
# runChefSolo.sh
# Author: abento+github@gmail.com
# Setup a set of cookbooks using chef-solo on a remote machine.
hostname=""
domain=""
cookbook_root="."
file_root="./provisioning/chef-solo"
@liesen
liesen / SpotifyViewsDemo.html
Created December 1, 2011 16:38
Spotify Apps API example
<!DOCTYPE html>
<html>
<head>
<title>API</title>
<link rel="stylesheet" href="sp://import/css/adam.css">
<style>
body {
-webkit-box-orient: vertical;
display: -webkit-box;