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
//DEPS org.testcontainers:testcontainers:1.15.3
import com.github.dockerjava.api.command.InspectContainerResponse;
import org.junit.Test;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.wait.strategy.Wait;
import org.testcontainers.images.builder.Transferable;
import java.nio.charset.StandardCharsets;
@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();
import os
from datetime import datetime
import time
import threading
import json
from kafka import KafkaProducer
from kafka.errors import KafkaError
from sklearn.model_selection import train_test_split
import pandas as pd
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@emaxerrno
emaxerrno / seastar.cmake
Created April 19, 2019 19:40
seastar.cmake
ExternalProject_Add(seastar
URL https://github.com/vectorizedio/seastar/archive/05efbce.tar.gz
URL_MD5 0f59761981794d549cc579b6a3278a7e
INSTALL_DIR @V_DEPS_INSTALL_DIR@
CMAKE_ARGS
-DCMAKE_BUILD_TYPE=@CMAKE_BUILD_TYPE@
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_PREFIX_PATH=<INSTALL_DIR>
-DSeastar_INSTALL=ON
-DSeastar_DPDK=ON
@emaxerrno
emaxerrno / line_length_hist.py
Created March 13, 2019 18:36
compute histogram based on text file line length w/ csv optional output
#!/usr/bin/env python3
import sys
import os
import argparse
import operator
import distutils.util
def generate_options():
parser = argparse.ArgumentParser(description='histogram per file lenth')
@emaxerrno
emaxerrno / stats.py
Created March 13, 2019 18:35
line_length_histogram.py
#!/usr/bin/env python3
import sys
import os
import argparse
import operator
import distutils.util
def generate_options():
parser = argparse.ArgumentParser(description='histogram per file lenth')
@emaxerrno
emaxerrno / gdb.txt
Created January 12, 2019 03:54
cmake-stack-trace
This file has been truncated, but you can view the full file.
#0 0x00007ffff7781475 in _IO_sputbackc () from /lib64/libc.so.6
#1 0x00007ffff7761c18 in __GI__IO_vfscanf () from /lib64/libc.so.6
#2 0x00007ffff77756b1 in vsscanf () from /lib64/libc.so.6
#3 0x00007ffff776fc68 in sscanf () from /lib64/libc.so.6
#4 0x0000000000a1cf35 in cmFindPackageCommand::InitialPass (this=0x1d673e0, args=std::vector of length 1, capacity 4 = {...}) at /home/agallego/workspace/cmake-3.13.2/Source/cmFindPackageCommand.cxx:152
#5 0x00000000009de897 in cmCommand::InvokeInitialPass (this=0x1d673e0, args=std::vector of length 4, capacity 4 = {...}, status=...) at /home/agallego/workspace/cmake-3.13.2/Source/cmCommand.cxx:19
#6 0x0000000000905a73 in cmMakefile::ExecuteCommand (this=0x10e2a90, lff=..., status=...) at /home/agallego/workspace/cmake-3.13.2/Source/cmMakefile.cxx:376
#7 0x0000000000a427ea in cmIfFunctionBlocker::IsFunctionBlocked (this=0x1d6b0e0, lff=..., mf=..., inStatus=...) at /home/agallego/workspace/cmake-3.13.2/Source/cmIfCommand.cxx:134
#8 0x0000000000912ffd in cmMake
@emaxerrno
emaxerrno / smfrpc.build.txt
Created January 9, 2019 20:05
semaphore-ci sucessful build
This file has been truncated, but you can view the full file.
git clone https://github.com/semaphoreci/toolbox.git ~/.toolbox
Cloning into '/home/semaphore/.toolbox'...
remote: Enumerating objects: 104, done.
remote: Counting objects: 0% (1/104) 
remote: Counting objects: 1% (2/104) 
remote: Counting objects: 2% (3/104) 
remote: Counting objects: 3% (4/104) 
remote: Counting objects: 4% (5/104) 
remote: Counting objects: 5% (6/104) 
remote: Counting objects: 6% (7/104) 
@emaxerrno
emaxerrno / main.yml
Created December 14, 2018 15:43
hotspot.yml
---
- name: redhat
when: ansible_os_family == "RedHat"
become: yes
dnf: name='{{item}}'
with_items:
- cmake
- gcc
- glibc-static
- gcc-c++