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 ...
| #!/bin/bash | |
| # Raspberry Pi ZRAM script | |
| # Tuned for quad core, 1 GB RAM models | |
| # put me in /etc/init.d/zram.sh and make me executable | |
| # then run "sudo update-rc.d zram.sh defaults" | |
| modprobe zram | |
| echo 3 >/sys/devices/virtual/block/zram0/max_comp_streams | |
| echo lz4 >/sys/devices/virtual/block/zram0/comp_algorithm |
| var p1={ | |
| x:0, | |
| y:0 | |
| }; | |
| var p2={ | |
| x:0, | |
| y:1 | |
| }; |
| : factorial ( n -- n! | err:1024 ) | |
| dup 0< if drop 1024 throw then | |
| dup 0= if | |
| drop 1 | |
| else | |
| dup 1= if | |
| drop 1 | |
| else | |
| dup 1- factorial * |
| // Based on https://github.com/nodyn/jvm-npm | |
| "use strict"; | |
| (function() { | |
| var System = java.lang.System, | |
| File = java.io.File, | |
| FileInputStream = java.io.FileInputStream, | |
| StringBuilder = java.lang.StringBuilder, | |
| BufferedReader = java.io.BufferedReader, | |
| InputStreamReader = java.io.InputStreamReader; |
| var Middleware = function() {}; | |
| Middleware.prototype.use = function(fn) { | |
| var self = this; | |
| this.go = (function(stack) { | |
| return function(next) { | |
| stack.call(self, function() { | |
| fn.call(self, next.bind(self)); | |
| }); |
You might want to read this to get an introduction to armel vs armhf.
If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.
First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux
If there's no qemu-arm-static in the package list, install qemu-user-static instead
Table of Contents generated with DocToc
| # npm publish with goodies | |
| # prerequisites: | |
| # `npm install -g trash conventional-recommended-bump conventional-changelog conventional-github-releaser conventional-commits-detector json` | |
| # `np` with optional argument `patch`/`minor`/`major`/`<version>` | |
| # defaults to conventional-recommended-bump | |
| # and optional argument preset `angular`/ `jquery` ... | |
| # defaults to conventional-commits-detector | |
| np() { | |
| travis status --no-interactive && | |
| trash node_modules &>/dev/null; |
I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.
In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.
While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.
Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio