bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
#include <sched.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <signal.h> | |
#include <sys/types.h> | |
#include <sys/wait.h> | |
#include <unistd.h> |
/* | |
* DJBX33A (Daniel J. Bernstein, Times 33 with Addition) | |
* | |
* This is Daniel J. Bernstein's popular `times 33' hash function as | |
* posted by him years ago on comp.lang.c. It basically uses a function | |
* like ``hash(i) = hash(i-1) * 33 + str[i]''. This is one of the best | |
* known hash functions for strings. Because it is both computed very | |
* fast and distributes very well. | |
* | |
* The magic of number 33, i.e. why it works better than many other |
/* | |
* Demonstrate a trivial filesystem using libfs. | |
* | |
* Copyright 2002, 2003 Jonathan Corbet <corbet@lwn.net> | |
* This file may be redistributed under the terms of the GNU GPL. | |
* | |
* Chances are that this code will crash your system, delete your | |
* nethack high scores, and set your disk drives on fire. You have | |
* been warned. | |
*/ |
#!/usr/bin/env bash | |
/Applications/VLC.app/Contents/MacOS/VLC -I rc "$@" |
# Single line of Ruby <3. | |
ruby -rjson -ryaml -e "puts YAML.load_file('my_file.yml').to_json" | |
# You can also pipe it to Python to get pretty ouput | |
ruby -rjson -ryaml -e "puts YAML.load_file('my_file.yml').to_json" | \ | |
python -mjson.tool | |
# Thats all. :) |
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
#!/usr/bin/env bash | |
rep() { | |
i=$1 | |
data=$2 | |
## run the replicate .... | |
} | |
# make the files | |
START=$(mktemp -t start-XXXX) ## signals the workers are starting |
#!/bin/bash | |
name=$RANDOM | |
url='http://localhost:9093/api/v1/alerts' | |
echo "firing up alert $name" | |
# change url o | |
curl -XPOST $url -d "[{ | |
\"status\": \"firing\", |
docker build -t $IMAGE_NAME - << EOF
FROM alpine:latest
...
EXPOSE 80
EOF
# ########################################################## # | |
# Makefile for Golang Project | |
# Includes cross-compiling, installation, cleanup | |
# ########################################################## # | |
# Check for required command tools to build or stop immediately | |
EXECUTABLES = git go find pwd | |
K := $(foreach exec,$(EXECUTABLES),\ | |
$(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH))) |