Skip to content

Instantly share code, notes, and snippets.

View MyParquetTest.java
package com.tele2;
import org.apache.avro.Schema;
import org.apache.avro.generic.GenericRecord;
import org.apache.commons.lang3.NotImplementedException;
import org.apache.flink.api.common.functions.FlatMapFunction;
import org.apache.flink.api.common.functions.MapFunction;
import org.apache.flink.api.common.io.FilePathFilter;
import org.apache.flink.api.java.DataSet;
View main.go
package main
import (
"fmt"
"net/http"
)
func speakHandler(w http.ResponseWriter, req *http.Request) {
switch req.Method {
case "GET":
@ecerulm
ecerulm / buildvim.sh
Created May 5, 2017
script to build vim
View buildvim.sh
#!/bin/bash
set -euxo pipefail
# e : fail as soon as a command fails, don't continue
# u : fail if nonexisting variable can't be expanded
# x : echo each line as it's executed
# -o pipefail: fail if a command in a pipe returns status != 0
make distclean
./configure \
--prefix=$HOME/.local/ \
View gist:db6795c16cf7e15333ce
install_rabbitmq:
pkg.installed:
- name: rabbitmq-server
@ecerulm
ecerulm / mac_example.c
Last active Oct 29, 2020
AES-CMAC using OpenSSL/libcrypto
View mac_example.c
// compile with
// cc `PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig" pkg-config --cflags --libs openssl` mac_example.c -o mac_example
// cc -I/usr/local/Cellar/openssl@1.1/1.1.1h/include -L/usr/local/Cellar/openssl@1.1/1.1.1h/lib -lssl -lcrypto mac_example.c
#include <stdio.h>
#include <openssl/cmac.h>
void printBytes(unsigned char *buf, size_t len) {
for(int i=0; i<len; i++) {
printf("%02x ", buf[i]);
}
View ecerulm-1.cfg
# sudo apt-get install -y equivs gdebi
# equivs-build ecerulm-1.cfg # will generate the .deb file
# use sudo gdebi -n ecerulm*.deb # to install the package
Section: misc
Priority: optional
Standards-Version: 3.9.2
Package: ecerulm
Version: 1.2
Depends: vim-nox,build-essential,tmux,byobu,python,python-dev
Depends: linux-generic,linux-headers-generic,dkms,git,meld,silversearcher-ag,ncdu,curl,apt-file
@ecerulm
ecerulm / packages_to_install.sh
Last active Dec 1, 2016
Install a series of packages
View packages_to_install.sh
#!/bin/sh
# curl -k https://gist.githubusercontent.com/ecerulm/be59ec62ad77178d61a5/raw | sh
PACKAGES=$(cat <<'EOF'
lua5.2-dev
docker.io
stow
tk-dev
exuberant-ctags
libssl-dev
@ecerulm
ecerulm / README.md
Last active Aug 29, 2015 — forked from mbostock/.block
d3 pack radius fail
View README.md

Enclosure diagrams use containment to represent the hierarchy. Although circle packing is not as space-efficient as a treemap, it better reveals the hierarchy. Implementation based on work by Jeff Heer. Data shows the Flare class hierarchy, also courtesy Jeff Heer.

See also this zoomable version.

View README.md

Enclosure diagrams use containment to represent the hierarchy. Although circle packing is not as space-efficient as a treemap, it better reveals the hierarchy. Implementation based on work by Jeff Heer. Data shows the Flare class hierarchy, also courtesy Jeff Heer.

See also this zoomable version.

@ecerulm
ecerulm / Gemfile
Last active Jan 23, 2020
Minimal config for sinatra / guard / livereload
View Gemfile
# A sample Gemfile
source "https://rubygems.org"
# gem "rails"
gem 'sinatra'
group :development, :test do
gem 'guard-livereload', require: false
gem 'rack-livereload'
gem 'guard'
end