Skip to content

Instantly share code, notes, and snippets.

@tazjin
tazjin / Main.java
Created September 5, 2016 23:54
Playing with Prometheus Java client
import io.prometheus.client.*;
import io.prometheus.client.exporter.common.TextFormat;
import io.prometheus.client.hotspot.DefaultExports;
import spark.Request;
import spark.Response;
import java.io.IOException;
import java.io.StringWriter;
import java.util.Random;
@itamarhaber
itamarhaber / method-1-binary-file.md
Last active May 16, 2019 17:27
Loading a binary value from a file with redis-cli

Create the file with the actual bytes, not the '\xnn\ representation. For example, in Python:

f = open('filename', 'w')
f.write('\x01\x02\x03')
f.close()

Load the file with redis-cli -x set keyname < filename