Skip to content

Instantly share code, notes, and snippets.

Avatar

Stijn Van Campenhout subutux

  • Continu IT NV
  • Belgium
  • Twitter @subutux
View GitHub Profile
View prettycron.js
////////////////////////////////////////////////////////////////////////////////////
// prettycron.js - Copyright (c) 2012 Pehr Johansson <pehr.l.johansson@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@subutux
subutux / README.md
Created Jun 6, 2014
Opsview boxcar notification method
View README.md

Usage:

  • Place this file into /usr/local/nagios/libexec/notifications/

  • Create a new notification method in Opsview (Advanced > Notification methods > "+")

    command: send_boxcar_notitfication.sh

    contact variables: BOXCAR_API

  • Edit your contacts: fill the Boxcar api with your api key

  • set the notification method on some notification groups

@subutux
subutux / gnome_background_desktoppr.py
Created Jun 13, 2014
A python script to randomize your Gnome desktop background using desktoppr
View gnome_background_desktoppr.py
#!/usr/bin/env python
import os,sys
import argparse
try:
import json
except ImportError:
import simplejson as json
import urllib2
from gi.repository import Gio
parser = argparse.ArgumentParser()
@subutux
subutux / postlogin.sh
Created May 20, 2015
Alert dovecot imap users about them exceeding quotum using IMAP ALERT (compatible with outlook 2007-2013)
View postlogin.sh
#!/bin/bash
#
# Author: Stijn Van Campenhout <stijn.vancampenhout@gmail.com>
#
# Calculate the percentage of the maildir quota using a mysql calculation.
# Compatible with dovecot & postfixadmin, using the quota2 format.
#
# Add this to the dovecot (2.x) configuration:
## /etc/dovecot/conf.d/10-master.conf
#service imap-postlogin {
@subutux
subutux / build-rt3070-driver.sh
Last active Dec 17, 2015
Building the RT3070 kernel driver
View build-rt3070-driver.sh
#!/bin/bash
cd /usr/src
sudo wget https://github.com/raspberrypi/linux/archive/rpi-3.6.y.tar.gz
sudo tar xvfz rpi-3.6.y.tar.gz
sudo ln -s /usr/src/linux-rpi-3.6.y/ /lib/modules/3.6.11+/build
cd /lib/modules/3.6.11+/build
sudo make mrproper
sudo su
gzip -dc /proc/config.gz > .config
make modules_prepare
View keybase.md

Keybase proof

I hereby claim:

  • I am subutux on github.
  • I am subutux (https://keybase.io/subutux) on keybase.
  • I have a public key whose fingerprint is 7B31 923A 456D 83D2 B0B2 9F3D 0941 1DE8 B117 9549

To claim this, I am signing this object:

View sensor.ino
// Enable debug prints
#define MY_DEBUG
// Enable and select radio type attached
#define MY_RADIO_NRF24
//#define MY_RADIO_RFM69
//#define MY_RS485
#include <SPI.h>
#include <MySensors.h>
View read_link.py
@subutux
subutux / denonavr.py
Created Nov 8, 2016
A home assistant media player component for denon AVR-XXXX recievers
View denonavr.py
"""
Support for Denon AVR Receivers.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.denonavr/
"""
import logging
from datetime import timedelta
import voluptuous as vol
from homeassistant.components.media_player import (