Skip to content

Instantly share code, notes, and snippets.

yarn run v1.17.3
$ grafana-toolkit plugin:dev
Running Dev plugin task
⠧ Bundling plugin in dev mode [tsl] ERROR in /opt/go/src/github.com/grafana/grafana/data/plugins/divanikus-alertstat-panel/src/module.ts(15,25)
TS2307: Cannot find module 'grafana/app/features/panel/panellinks/link_srv'.
[tsl] ERROR in /opt/go/src/github.com/grafana/grafana/data/plugins/divanikus-alertstat-panel/src/module.ts(30,3)
TS2564: Property 'series' has no initializer and is not definitely assigned in the constructor.
[tsl] ERROR in /opt/go/src/github.com/grafana/grafana/data/plugins/divanikus-alertstat-panel/src/module.ts(32,3)
TS2564: Property 'fontSizes' has no initializer and is not definitely assigned in the constructor.
[tsl] ERROR in /opt/go/src/github.com/grafana/grafana/data/plugins/divanikus-alertstat-panel/src/module.ts(33,3)
#!/usr/bin/env ruby
require "minitest/autorun"
require "minitest/doc_reporter"
SMART_CMD = "sudo smartctl"
ZPOOL_CMD = "sudo zpool"
describe "Disks" do
disks = %x{#{SMART_CMD} --scan-open}.scan /^\S+/
# Class to compare dpkg versions
class Version
include Comparable
attr_reader :epoch, :version, :revision
def initialize(version)
epoch = version.split(':')
if epoch.count > 1
if epoch[0].to_i.between?(0, 10)
@epoch = epoch[0].to_i
@divanikus
divanikus / pack.sh
Created November 26, 2014 22:01
Convert gems with dependencies to debs using fpm
#!/bin/bash
GEM=$1
VER=$2
INSTALL_PATH=$(gem env | grep "INSTALLATION DIRECTORY" | awk '{print $4}')
if [ -n $2 ]; then
VER=$2
fi
@divanikus
divanikus / cgconfig.sh
Created November 17, 2014 23:01
cgroup init scripts for debian wheezy
#! /bin/sh
### BEGIN INIT INFO
# Provides: cgconfig
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Load cgroup configuration
# Description: Loads cgconfig.conf and creates cgroup layout based on it
### END INIT INFO
#!/bin/sh
### BEGIN INIT INFO
# Provides: riemann-dash
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Riemann dashboard
# Description: The Riemann monitoring dashboard.
### END INIT INFO