# Using docker
Docker —rm -d —name Kafka -e KAFKA_CREATE_TOPICS=test:1:1 wurstmeister/kafka -p 9092 9092
# Using OS
nohup bin/zookeeper-server-start.sh config/zookeeper.properties &
nohup bin/kafka-server-start.sh config/server.properties &
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Downloading packages | |
wget http://ftp.it.debian.org/debian/pool/main/g/gconf/gconf2_3.2.6-8_amd64.deb | |
wget http://ftp.it.debian.org/debian/pool/main/g/gconf/libgconf-2-4_3.2.6-8_amd64.deb | |
wget http://ftp.it.debian.org/debian/pool/main/g/gconf/gconf2-common_3.2.6-8_all.deb | |
wget http://ftp.it.debian.org/debian/pool/main/g/gconf/gconf-service_3.2.6-8_amd64.deb | |
wget http://ftp.it.debian.org/debian/pool/main/o/openldap/libldap-2.5-0_2.5.13%2bdfsg-5_amd64.deb | |
# Configuring the libgconf-2-4 package |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mxlibrary>[{"data":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCIgdmlld0JveD0iMiAyIDI4IDI4IiBmaWxsPSJub25lIj4mI3hhOzxwYXRoIGQ9Ik0zMCAxMC40MDA0TDI3LjE5ODYgNy42MDE0MUwyNC4yMjEyIDEwLjU3NjJMMjEuNDMwNCA3Ljc4Nzc3TDI0LjQxODMgNC44MDI0NkwyMS42MTY5IDJMMTYuMDEwNiA3LjYwMTQxTDEwLjQwNzcgMkw3LjYwNjM0IDQuNzk4OTVMMTAuNDE0OCA3LjYwNDkyTDcuNjEzMzcgMTAuNDAzOUw0LjgwNDkzIDcuNTk3ODlMMiAxMC40MDA0TDcuNjA2MzQgMTYuMDAxOEwyIDIxLjU5OTZMNC44MDE0MSAyNC4zOTg2TDcuNDEyNzcgMjEuNzg5NUwxMC4yMTQyIDI0LjU4ODVMNy42MDI4MiAyNy4xOTc1TDEwLjQwNDIgMjkuOTk2NUwxNi4wMTA2IDI0LjM5ODZMMjEuNjE2OSAzMEwyNC40MTgzIDI3LjIwMTFMMjEuNjI3NSAyNC40MTI3TDI0LjQxODMgMjEuNjI0M0wyNy4xOTg2IDI0LjQwMjFMMzAgMjEuNjAzMkwyNC4zOTcyIDE1Ljk5ODJMMzAgMTAuNDAwNFpNMTkuMjU4OSAyMi4wNDI3TDE2LjAxNDEgMTguODAwN0wxMi41ODYyIDIyLjIyNTVMOS43ODQ4MiAxOS40MjY2TDEzLjIxMjcgMTYuMDAxOEw5Ljk4MTkgMTIuNzczOEwxMi43ODMzIDkuOTc0ODhMMTYuMDE0MSAxMy4yMDI4TDE5LjA2MTggMTAuMTU3N0wyMS44NTI3IDEyLjk0NjFMMTguNzkwOCAxNi4wMDUzTDIyLjA0OTggMTkuMjYxM0wxOS4yNTg5IDIyL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mxlibrary>[{"data":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgNDggNDgiPiYjeGE7ICAgIDxwYXRoIGZpbGw9IiMyMTk2RjMiIGQ9Ik0zNyw0MEgxMWwtNiw2VjEyYzAtMy4zLDIuNy02LDYtNmgyNmMzLjMsMCw2LDIuNyw2LDZ2MjJDNDMsMzcuMyw0MC4zLDQwLDM3LDQweiIvPiYjeGE7ICAgIDxnIGZpbGw9IiNmZmYiPiYjeGE7ICAgICAgICA8cmVjdCB4PSIyMiIgeT0iMjAiIHdpZHRoPSI0IiBoZWlnaHQ9IjExIi8+JiN4YTsgICAgICAgIDxjaXJjbGUgY3g9IjI0IiBjeT0iMTUiIHI9IjIiLz4mI3hhOyAgICA8L2c+JiN4YTs8L3N2Zz4=","w":48,"h":48,"aspect":"fixed"},{"data":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgNDggNDgiPiYjeGE7ICAgIDxnIGZpbGw9IiNEMUM0RTkiPiYjeGE7ICAgICAgICA8cGF0aCBkPSJNMzgsN0gxMEM4LjksNyw4LDcuOSw4LDl2NmMwLDEuMSwwLjksMiwyLDJoMjhjMS4xLDAsMi0wLjksMi0yVjlDNDAsNy45LDM5LjEsNywzOCw3eiIvPiYjeGE7ICAgICAgICA8cGF0aCBkPSJNMzgsMTlIMTBjLTEuMSwwLTIsMC45LTIsMnY2YzAsMS4xLDAuOSwyLDIsMmgyOGMx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let tmparr; | |
// your code here | |
function findMaxPathLength(map, row, col) { | |
tmparr = new Array(row).fill(new Array(col).fill(-1)); | |
let max = 0; | |
for (let i = 0; i < row; i++) { | |
for (let j = 0; j < col; j++) { | |
let x = recur(map, i, j); | |
if (max < x) { | |
max = x; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* calculating from a string of polish postfix notation | |
* @param str: String of polish postfix notation | |
* @returns {*} | |
*/ | |
function polishPostfix(str) { | |
let arr = str.split(' '); | |
let st = []; | |
for (let item of arr) { | |
// console.log(st, item); |
openssl req -x509 -newkey rsa:4096 -sha256 -keyout example.key -out example.crt -subj "/CN=example.com" -days 3650 -passout pass:foobar
openssl x509 -x509toreq -in example.crt -out example.csr -signkey example.key -passin pass:foobar
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
version: '2' | |
services: | |
zk1: | |
image: confluentinc/cp-zookeeper:5.1.0 | |
environment: | |
ZOOKEEPER_SERVER_ID: 1 | |
ZOOKEEPER_CLIENT_PORT: 22181 | |
ZOOKEEPER_TICK_TIME: 2000 | |
ZOOKEEPER_INIT_LIMIT: 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
version: '2' | |
services: | |
zk1: | |
image: confluentinc/cp-zookeeper:5.1.0 | |
environment: | |
ZOOKEEPER_SERVER_ID: 1 | |
ZOOKEEPER_CLIENT_PORT: 22181 | |
ZOOKEEPER_TICK_TIME: 2000 | |
ZOOKEEPER_INIT_LIMIT: 5 |
NewerOlder