Skip to content

Instantly share code, notes, and snippets.

🥺
Stars in the sky, not in my repos!

Syed Sirajul Islam Anik ssi-anik

🥺
Stars in the sky, not in my repos!
View GitHub Profile
@ssi-anik
ssi-anik / docker-compose.yml
Last active Jul 10, 2020
docker compose for Elasticsearch, Kibana, APM 6.8 & APM 7.8
View docker-compose.yml
version: "2"
services:
php:
build:
dockerfile: php.dockerfile
context: .
volumes:
- .:/app
ports:
@ssi-anik
ssi-anik / elastic_apm.ini
Created Jul 10, 2020
PHP Elastic APM ini file
View elastic_apm.ini
extension=elastic_apm.so
elastic_apm.bootstrap_php_part_file=/home/apm-agent/apm/src/bootstrap_php_part.php
elastic_apm.enabled=true
elastic_apm.server_url="http://docker.for.mac.localhost:8200"
; elastic_apm.secret_token=
elastic_apm.service_name="PHP APM Test Service"
; service_version= ${git rev-parse HEAD}
elastic_apm.log_level=DEBUG
; Available Log levels
; OFF | CRITICAL | ERROR | WARNING | NOTICE | INFO | DEBUG | TRACE
@ssi-anik
ssi-anik / php.dockerfile
Created Jul 6, 2020
Elastic APM agent PHP installation in Docker container
View php.dockerfile
FROM php:7.4-fpm
RUN apt-get update
RUN apt-get install -y libpq-dev libpng-dev curl nano unzip zip git jq supervisor
RUN docker-php-ext-install pdo_pgsql
RUN pecl install -o -f redis
@ssi-anik
ssi-anik / graphql-query-client-side.js
Created Jul 5, 2020 — forked from varunon9/graphql-query-client-side.js
Querying to graphql server from browser using JQuery Ajax
View graphql-query-client-side.js
var globals = {}; // application wide global variable
globals.constants = {
}
globals.showToastMessage = function(heading, message, icon) {
$.toast({
heading: heading,
text: message,
showHideTransition: 'slide',
@ssi-anik
ssi-anik / Dockerfile
Created Jun 27, 2020
PHP dockerfile for rdkafka/kafka/libkafka
View Dockerfile
FROM php:7.4-fpm
RUN apt-get update
RUN apt-get install -y librdkafka-dev
RUN pecl install channel://pecl.php.net/rdkafka-beta
RUN rm -rf /tmp/pear
@ssi-anik
ssi-anik / docker-compose.yml
Created Jun 27, 2020
docker-compose.yml file for kafka-zookeeper
View docker-compose.yml
version: '2'
services:
zookeeper:
image: bitnami/zookeeper:3.6.1
ports:
- 2181:2181
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOO_ENABLE_AUTH=yes
@ssi-anik
ssi-anik / kafka
Created Jun 14, 2020 — forked from sonhmai/kafka
kafka basic commands
View kafka
# BENCHMARK-----------------------------------------------------
#1. Rust kafka-benchmark (https://github.com/fede1024/kafka-benchmark)
# must create topic with 6 partitions first
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 6--topic [scenario]
# replace scenario with one in file kafka-benchmark/config/base_producer.yaml
@ssi-anik
ssi-anik / scripts.php
Created May 29, 2020
PHP object Lifecycle.
View scripts.php
<?php
echo 'script 1 start' . PHP_EOL;
class A12
{
public $script = null;
public function __construct ($script = 's1') {
$this->script = $script;
}
@ssi-anik
ssi-anik / gist:b4e770ba71225c1226ebdaff5df10c2b
Created May 21, 2020 — forked from wumpz/gist:5846559
list authors of a git repository including commit count and email
View 2017_05_19_120000_add_user_api_token_field.php
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddUserApiTokenField extends Migration
{
/**
* Run the migrations.
You can’t perform that action at this time.