Skip to content

Instantly share code, notes, and snippets.

@rosic
rosic / kafka-cheat-sheet.md
Created March 15, 2019 11:41 — forked from ursuad/kafka-cheat-sheet.md
Quick command reference for Apache Kafka

Kafka Topics

List existing topics

bin/kafka-topics.sh --zookeeper localhost:2181 --list

Describe a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic

Purge a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000

... wait a minute ...

@rosic
rosic / tmux.md
Created June 29, 2016 12:37 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

# https://github.com/jimweirich/gilded_rose_kata#original-description-of-the-gilded-rose
class GildedRose
attr_reader :name, :days_remaining, :quality
def initialize(name, days_remaining, quality)
@name, @days_remaining, @quality = name, days_remaining, quality
end
def tick
if @name != 'Aged Brie' && @name != 'Backstage passes to a TAFKAL80ETC concert'
# This simplest thing is to clone Jim's repo (https://github.com/jimweirich/gilded_rose_kata) and then
# put this file in the root directory.
gem 'minitest', '~> 4.7'
require "minitest/autorun"
require "minitest/reporters"
MiniTest::Reporters.use! MiniTest::Reporters::SpecReporter.new
require_relative './gilded_rose'
@rosic
rosic / gist:6536564
Created September 12, 2013 12:31 — forked from antirez/gist:4554824
Shows all the non-common commits in the two branches, where non-common commits means simply commits with a unique commit *message*.
#!/usr/bin/tclsh8.5
#
# Usage: git-unmerged branch1 branch2
#
# Shows all the non-common commits in the two branches, where non-common
# commits means simply commits with a unique commit *message*.
proc getlog branch {
lrange [split [exec git log $branch --oneline] "\n"] 0 400
}
@rosic
rosic / 04_jshint.rake
Created June 25, 2012 14:46 — forked from gijs/04_jshint.rake
Javascript Loves CI: Jenkins + Jasmine + PhantomJS + JSHint
namespace :jshint do
task :require do
sh "which jshint" do |ok, res|
fail 'Cannot find jshint on $PATH' unless ok
end
end
task :check => 'jshint:require' do
project_root = File.expand_path('../../', File.dirname(__FILE__))
config_file = File.join(project_root, 'config', 'jshint.json')
<div class="search-checklist">
<div class=search-category><input id="ctl00_topContent_campSearchAdvanced_BASIC_SEARCH_PLACES_MOVEABLE" class="cat-box" pid="39" type="checkbox"></input>
<label for="ctl00_topContent_campSearchAdvanced_BASIC_SEARCH_PLACES_MOVEABLE" id="ctl00_topContent_campSearchAdvanced_phBasic_lblBASIC_SEARCH_PLACES_MOVEABLE" class="search-category">Places - moveable</label><br />
<input id="ctl00_topContent_campSearchAdvanced_PLACES_MOVEABLE_PARKING_ON_THE_PLACE" class="flag-box" pid="17" type="checkbox"></input>
<label for="ctl00_topContent_campSearchAdvanced_PLACES_MOVEABLE_PARKING_ON_THE_PLACE" id="ctl00_topContent_campSearchAdvanced_phBasic_lblPLACES_MOVEABLE_PARKING_ON_THE_PLACE">Parkování aut přímo na místě(u stanu/caravanu)</label><br />
</div>
</div>