Skip to content

Instantly share code, notes, and snippets.

View bgsrb's full-sized avatar
🏠
Focusing

navid sohrabi bgsrb

🏠
Focusing
View GitHub Profile
@bgsrb
bgsrb / benchmark-commands.txt
Created August 9, 2022 18:01 — forked from jkreps/benchmark-commands.txt
Kafka Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196
package main
import (
"net/http"
"sync"
"time"
"golang.org/x/time/rate"
)
@bgsrb
bgsrb / GuzzleHttp.php
Created December 30, 2018 07:56
Kavenegar VerifyLookup in GuzzleHttp Client
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Exception\ConnectException;
try {
$apikey = '';
var apikey="your apikey here";
var sender="your sender line number";
function sendSms(receptor, message) {
var messages_url = "https://api.kavenegar.com/v1/"+apikey+"/sms/send.json";
var payload = {
"receptor": receptor,
"message" : message,
"sender" : sender
};
var options = {
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software