Skip to content

Instantly share code, notes, and snippets.

View warborn's full-sized avatar

Iván Munguía warborn

View GitHub Profile
@warborn
warborn / dashboards_spec.md
Last active October 22, 2018 18:31
A first approach to the development of the Dasboard's feature

Dashboards Spec

Elasticsearch Index

In order to have a flexible schema that will be easy to maintain, the proposed approach is to save a Dashboard as a String that stores a JSON document that can be parsed by GraphQL and at the end by our frontend.

The index representation is the following one:

curl -k -XPUT --silent "http://localhost:9200/dashboards_v1?pretty" -H 'Content-Type: application/json' -d '
@chriswhong
chriswhong / RadiusMode.js
Created March 1, 2018 12:04
RadiusMode, a custom mode for mapbox-gl-draw for drawing a radius
// custom mapbopx-gl-draw mode that modifies draw_line_string
// shows a center point, radius line, and circle polygon while drawing
// forces draw.create on creation of second vertex
import MapboxDraw from 'mapbox-gl-draw';
import numeral from 'numeral';
import lineDistance from 'npm:@turf/line-distance';
const RadiusMode = MapboxDraw.modes.draw_line_string;
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000