Skip to content

Instantly share code, notes, and snippets.

@mmedvede
mmedvede / m3aggregator_parrallel_flush
Last active July 19, 2019 20:21
# Notes on setting up parallel metric writes from m3aggregator
# Notes on setting up parallel metric writes from m3aggregator
# Setup aggregation topics
curl -vvvsSf -X POST -H 'topic-name: aggregated_metrics' localhost:7201/api/v1/topic/init -d '{ "numberOfShards": 64 }'
curl -vvvsSf -X POST -H 'topic-name: aggregated_metrics_2' localhost:7201/api/v1/topic/init -d '{ "numberOfShards": 64 }'
# coordinator that would be on aggregated_metrics topic
curl -vvvsSf -X POST localhost:7201/api/v1/services/m3coordinator/placement/init -d '{
"instances": [
@mmedvede
mmedvede / dstat_fsspace.py
Created February 17, 2017 20:27
dstat plugin for showing free disk space
# Drop this into /usr/local/share/dstat (or equivalent).
# Use it like so:
# DSTAT_FSSPACE_MOUNTS=/,/opt dstat --fsspace"
class dstat_plugin(dstat):
""" Disk use, based on freespace plugin """
def __init__(self):
self.nick = ('used', 'free', 'total')
self.cols = len(self.nick)
# Terminator plugin that turns all gerrit IDs into clickable links.
# Place this into ~/.config/terminator/plugins/ and then enable it in
# terminator preferences.
# mmedvede
import terminatorlib.plugin as plugin
AVAILABLE = ['GerritIDURLHandler']
@mmedvede
mmedvede / cm
Created February 26, 2014 05:49
Shortcut for building catkin workspace from anywhere within the workspace (ROS)
#!/usr/bin/env bash
# Use catkin_make from anywhere in a workspace.
# Ascends from current directory until a catkin workspace root is reached,
# and invokes catkin_make.
# mmedvede@cs.uml.edu
set -e
set -u
#! /usr/bin/env bash
# mmedvede
file_to_patch="/usr/lib/python2.7/threading.py"
echo "Fixes python 2.7 issue with 'DummyThread object has no attribute...'
according to http://bugs.python.org/issue14308
"
if [ ! -e "$file_to_patch" ]; then