Skip to content

Instantly share code, notes, and snippets.

View fannyhasbi's full-sized avatar

Fanny Hasbi fannyhasbi

View GitHub Profile
@fannyhasbi
fannyhasbi / axios-catch-error.js
Created June 30, 2020 12:31 — forked from fgilio/axios-catch-error.js
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@fannyhasbi
fannyhasbi / benchmark-commands.md
Created September 8, 2019 19:25 — forked from ueokande/benchmark-commands.md
Kafka Benchmark Commands

Benchmark commands

Producer

Setup

bin/kafka-topics.sh \
  --zookeeper zookeeper.example.com:2181 \
  --create \
@fannyhasbi
fannyhasbi / proto.msg
Created July 25, 2019 02:20 — forked from alexeypegov/proto.msg
ProtoBuffers debug with CURL. ProtoBuffers should be installed first: "yum install protobuf" or "brew install protobuf".
key:"string value"
int_key:22