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 ...
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 ...
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
/* Define two variables as the loop limits */ | |
@from : 0; | |
@to : 10; | |
/* Create a Parametric mixin and add a guard operation */ | |
.loop(@index) when(@index =< @to) { | |
/* As the mixin is called CSS is outputted */ | |
div:nth-child(@{index}) { | |
top: unit(@index * 100, px); |
var Rx = require('./rx.node') | |
, twitter = require('ntwitter') | |
, credentials = require('./credentials') | |
, io = require('socket.io').listen(80); | |
var customBind = function (self, method) { | |
return function () { | |
return self[method].apply(self, arguments); | |
}; | |
}; |