Skip to content

Instantly share code, notes, and snippets.

@sarwarbhuiyan
sarwarbhuiyan / metricbeat-jolokia-jmx-wildcard
Last active February 12, 2020 19:32
Kafka JMX metrics via jolokia
- module: jolokia
metricsets: ["jmx"]
period: 10s
hosts: ["localhost:8778/jolokia/"]
namespace: "metrics"
jmx.mappings:
- mbean: 'kafka.server:type=*,name=*'
attributes:
- attr: Value
field: value
@sarwarbhuiyan
sarwarbhuiyan / SarwarToken.sol
Created January 12, 2019 17:54
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.2+commit.1df8f40c.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.6.0;
import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-solidity/release-v2.1.0/contracts/ownership/Ownable.sol";
contract SarwarCoin is Ownable {
address private _owner;
string symbol;
string name;
uint totalCoins;
@sarwarbhuiyan
sarwarbhuiyan / gist:8b4c74ce7a7cbd9a2f56
Created January 8, 2016 19:49
date range filter improvement
time curl "localhost:9200/stats-2016.01.05/nextgen-stats/_search?pretty" -d '{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"bool": {
"must": [
{
time curl "localhost:9200/stats-2016.01.05/nextgen-stats/_search?pretty" -d '{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"bool": {
"must": [
{