Skip to content

Instantly share code, notes, and snippets.

View emaxerrno's full-sized avatar
💭
I may be slow to respond.

Alexander Gallego emaxerrno

💭
I may be slow to respond.
View GitHub Profile
@emaxerrno
emaxerrno / elastic-simple.js
Last active January 27, 2021 03:26 — forked from andresaristizabal/elastic.js
wasm defintion for indexing record values to Elastic Search server
const {
SimpleTransform,
PolicyError,
} = require("@vectorizedio/wasm-api");
const { Client } = require('@elastic/elasticsearch')
const client = new Client({node: 'http://localhost:9200'})
const transform = new SimpleTransform();
@emaxerrno
emaxerrno / pgo.sh
Created October 29, 2018 03:38 — forked from daniel-j-h/pgo.sh
pgo: profile guided optimization with gcc
# Instrument binaries, pgo data to /data/pgo, serial make is important to not confuse the pgo generator
env CXXFLAGS='-march=native -fprofile-dir=/data/pgo -fprofile-generate=/data/pgo' cmake .. -DCMAKE_BUILD_TYPE=Release
make -j 1
# Run instrumented program, generate and write pgo data
./runIt
# Use profile data and feed into gcc, correct for threading counter noise, serial make is important to not confuse the pgo generator
env CXXFLAGS='-march=native -fprofile-dir=/data/pgo -fprofile-use=/data/pgo -fprofile-correction' cmake .. -DCMAKE_BUILD_TYPE=Release
make -j 1
@emaxerrno
emaxerrno / benchmark-commands.txt
Created October 4, 2017 00:50 — 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
@emaxerrno
emaxerrno / mesos_isolators.md
Created July 28, 2017 12:37 — forked from chetan/mesos_isolators.md
Description of available Apache Mesos isolators
@emaxerrno
emaxerrno / re2testbasic.cpp
Created November 28, 2016 05:44 — forked from chezou/re2testbasic.cpp
Sample code of re2 basic regexp functions.
#include <iostream>
#include <string>
#include <re2/re2.h>
#include <vector>
using namespace std;
void test_fullmatch(){
string s,t;
string str("あぶらかたぶら");
@emaxerrno
emaxerrno / README
Created December 15, 2015 21:20 — forked from louiscryan/README
GRPC - Curl, HTTP/1.1 & nghttp misc
# Build the GRPC Java server which is used for interop testing.
# Interface defined here
# https://github.com/grpc/grpc-java/blob/master/interop-testing/src/main/proto/io/grpc/testing/integration/test.proto
./gradlew :grpc-interop-testing:installDist
# Run it with TLS turned on so ALPN is enabled. Uses a dummy cert
./interop-testing/build/install/grpc-interop-testing/bin/test-server --port=8080 --use_tls=true
# Run the awesome nghttp2 as a proxy in front of it.
# See https://nghttp2.org/documentation/package_README.html#building-from-git
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
#!/bin/bash
set -o errexit
# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete, e.g., git-delete-history path1 path2
if [ $# -eq 0 ]; then
exit 0
  1. General Background and Overview