Skip to content

Instantly share code, notes, and snippets.

View Jacketbg's full-sized avatar

Yordan Yordanov Jacketbg

  • Innologica Ltd
  • Bulgaria
View GitHub Profile
@Jacketbg
Jacketbg / grafana_ipmi_power_dashboard.json
Last active May 10, 2018 12:59
Grafana dashboard for plotting server power usage from Graphite
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@Jacketbg
Jacketbg / ipmi_graphite.sh
Last active May 10, 2018 12:56
Collect power monitoring data from various vendors and pump it to Graphite
#!/bin/bash
PORT=2003
SERVER=192.168.55.55
# Uncomment the line below for Supermicro IPMIs (ftp://ftp.supermicro.com/utility/IPMICFG)
WATT=$( ipmicfg -nm oemgetpower | awk '{print $1}' )
# Uncomment the line below for HP iLO (yum install freeipmi.x86_64)
#WATT=$( ipmi-dcmi --get-system-power-statistics | grep 'Current Power' | awk '{print $4}' )
# Uncomment and edit the line below to send static usage data (if you don't have a power monitor)
#WATT=160
echo "ipmi-stats.cluster.`hostname -s`.power ${WATT} `date +%s`" | nc ${SERVER} ${PORT}
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: Your XQuartz (2.7.7) is outdated
Please install XQuartz 2.7.8:
https://xquartz.macosforge.org
Warning: /Library/Frameworks/libcurl.framework detected
@Jacketbg
Jacketbg / php55-tidy
Created March 12, 2016 14:53
php55-tidy
# brew install -v php55-tidy
==> Installing php55-tidy from homebrew/php
==> Downloading https://php.net/get/php-5.5.33.tar.bz2/from/this/mirror
Already downloaded: /Library/Caches/Homebrew/php55-tidy-5.5.33
==> Verifying php55-tidy-5.5.33 checksum
tar xvf /Library/Caches/Homebrew/php55-tidy-5.5.33
==> /usr/local/opt/php55/bin/phpize
Configuring for:
PHP Api Version: 20121113
Zend Module Api No: 20121212
@Jacketbg
Jacketbg / fetch_inoreader_starred_articles
Created April 27, 2015 12:46
Fetch your Inoreader starred articles
<?php
/*
This script exports user's starred articles via the official Inoreader API.
Use it in case you have thousands of starred articles since Inoreader's export function will not export much more than 1000 articles.
Use your Inoreader email and password to sign in.
You will need to create a developer application first to obtain $app_id and $app_key. Read here about this - http://www.inoreader.com/developers/register-app
*/
$email = ""; // You Inoreader username or email
$password = ""; // Your Inoreader password