Skip to content

Instantly share code, notes, and snippets.

View lechidung's full-sized avatar
⛰️
Go up and never stop....

Johnny Lê lechidung

⛰️
Go up and never stop....
  • Techbase Vietnam Company Limited
  • Ho Chi Minh City, Vietnam
  • 07:59 (UTC +07:00)
View GitHub Profile
@lechidung
lechidung / Install Athenz
Last active August 25, 2019 10:36
Install Athenz
# INSTALL ZMS
bin/setup_dev_zms.sh
sudo bin/zms start
sudo bin/zms stop
# INSTALL ZTS
bin/setup_dev_zts.sh 172.104.48.122 /root/athenz-zms-1.8.11/var/zms_server/certs/zms_cert.pem
@lechidung
lechidung / sync visual studio code
Created August 16, 2019 08:52
sync visual studio code
{
"url": "https://api.github.com/gists/408324817b197e9e6c3bc239e59fa880",
"forks_url": "https://api.github.com/gists/408324817b197e9e6c3bc239e59fa880/forks",
"commits_url": "https://api.github.com/gists/408324817b197e9e6c3bc239e59fa880/commits",
"id": "408324817b197e9e6c3bc239e59fa880",
"node_id": "MDQ6R2lzdDQwODMyNDgxN2IxOTdlOWU2YzNiYzIzOWU1OWZhODgw",
"git_pull_url": "https://gist.github.com/408324817b197e9e6c3bc239e59fa880.git",
"git_push_url": "https://gist.github.com/408324817b197e9e6c3bc239e59fa880.git",
"html_url": "https://gist.github.com/408324817b197e9e6c3bc239e59fa880",
"files": {
@lechidung
lechidung / Start a consumer on Kafka
Created July 9, 2019 04:36
Start a consumer on Kafka
> bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginning
Message 1
Message 2
@lechidung
lechidung / Send messages in Kafka
Created July 9, 2019 04:35
Send messages in Kafka
> bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test
Message 1
Message 2
@lechidung
lechidung / Use topic of Kafka
Created July 9, 2019 04:33
Use topic of Kafka
# Create topic with named "test"
bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic
# See topic test
bin/kafka-topics.sh --list --bootstrap-server localhost:9092 test
@lechidung
lechidung / Install and start Kafka
Created July 9, 2019 04:28
Install and start Kafka
# 1. Download Kafka and Install
wget http://ftp.jaist.ac.jp/pub/apache/kafka/2.2.0/kafka_2.12-2.2.0.tgz
tar -xzf kafka_2.12-2.2.0.tgz
cd kafka_2.12-2.2.0
# 2. Start Zookeeper server (in new terminal)
bin/zookeeper-server-start.sh config/zookeeper.properties &
@lechidung
lechidung / Use Pulsar standalone
Created July 9, 2019 03:14
Use Pulsar standalone
# 1. Consume a message
sudo bin/pulsar-client consume my-topic -s "first-subscription"
# 2. Produce a message
sudo bin/pulsar-client produce my-topic --messages "hello-pulsar 2"
@lechidung
lechidung / Install and start Start Pulsar standalone
Created July 9, 2019 03:13
Install and start Start Pulsar standalone
# 1. Install Java
sudo yum install java-1.8.0-openjdk
# 2. Download Apache Pulsar package
wget https://archive.apache.org/dist/pulsar/pulsar-2.4.0/apache-pulsar-2.4.0-bin.tar.gz
# 3. Unzip Apache Pulsar package
tar xvfz apache-pulsar-2.4.0-bin.tar.gz
# 4. Execute Apache Pulsar
@lechidung
lechidung / Bring Your Own Integrations
Created June 25, 2019 09:01
Bring Your Own Integrations
resource_types:
- name: slack
type: docker-image
source:
repository: quay.io/ahelal/bender
tag: latest
resources:
- name: slack-deploy
type: slack
@lechidung
lechidung / Rapid Local Iteration
Created June 25, 2019 08:53
Rapid Local Iteration
~/booklit $ fly -t ci execute -c ci/test.yml
executing build 1 at http://localhost:8080/builds/1
initializing
booklit: 4.74 MiB/s 0s
running gopath/src/github.com/vito/booklit/ci/test
fetching dependencies...
installing ginkgo...
running tests...