Skip to content

Instantly share code, notes, and snippets.

View orecus's full-sized avatar

Martin Karlsson orecus

  • Karlskrona, Sweden
  • 23:29 (UTC +02:00)
View GitHub Profile
@orecus
orecus / homeyToGrafana.md
Last active March 17, 2018 19:46
Homey -> Prometheus -> Grafana

Homey -> Prometheus -> Grafana

This is based upon using docker on a linux based OS, exchange IP details and the docker configuration accordingly to your setup.

I'm using Portainer (portainer.io) to manage my docker containers and create them through ssh.

Homey

  • Install https://apps.athom.com/app/io.prometheus to your homey, no configuration needed.

Install and setup Prometheus

@orecus
orecus / sortablelist.jsx
Last active August 4, 2016 16:45
A quick (and dirty) example of using react-sortable-hoc together with Material-UI
import React, { Component } from 'react';
import { SortableContainer, SortableElement, arrayMove } from 'react-sortable-hoc';
//UI-Elements
import * as Colors from 'material-ui/styles/colors';
import { List, ListItem } from 'material-ui/List';
import DragHandle from 'material-ui/svg-icons/editor/drag-handle';
const SortableItem = SortableElement(({item}) => <ListItem leftIcon={<DragHandle />} primaryText={item.name} style={{backgroundColor: item.color}}/>);
const SortableList = SortableContainer(({items}) => {