Graphing data pulled from an RRD file using javascriprrd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// return an array of objects containing D3elements, one per DS | |
// | |
// data = [ | |
// { | |
// name: <DS name>, | |
// values: [{ date: <timestamp>, value: 1}, { date: <timestamp>, value: 2}] | |
// }, | |
// { | |
// name: <DS name>, | |
// values: [{ date: <timestamp>, value: 1}, { date: <timestamp>, value: 2}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
############################################################################################################################### | |
## Name: appswitch.pl | |
## | |
## Purpose: Executed by irexec this script will cycle between mythtv and kodi using a single button. | |
## | |
## (C)opyright 2008 Arksoft. | |
## | |
## Author: Arkay | |
## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ofstream fSlots; | |
fSlots.open(SLOTS); | |
fSlots << "ADAFRUIT-UART2" << std::endl; | |
fSlots << "PyBBIO-epwmss0" << std::endl; | |
fSlots << "PyBBIO-eqep0" << std::endl; | |
fSlots << "PyBBIO-epwmss1" << std::endl; | |
fSlots << "PyBBIO-eqep1" << std::endl; | |
fSlots.close(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Make sure only root can run our script | |
if [[ ${EUID} -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
if [[ $# -eq 0 ]]; then | |
echo "Usage:" | |
echo " $0 <systemd|sysv>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pi@raspberrypi ~ $ sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev \ | |
pkg-config libgl1-mesa-dev libgles2-mesa-dev \ | |
python-setuptools libgstreamer1.0-dev git-core \ | |
gstreamer1.0-plugins-{bad,base,good,ugly} \ | |
gstreamer1.0-{omx,alsa} python-dev cython | |
pi@raspberrypi ~ $ sudo pip install git+https://github.com/kivy/kivy.git@master | |
pi@raspberrypi ~ $ sudo apt-get install python-{pygments,docutils} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kivy | |
kivy.require('1.9.0') | |
from kivy.app import App | |
from kivy.uix.widget import Widget | |
from kivy.uix.button import Button | |
from kivy.properties import NumericProperty, ObjectProperty | |
import RPi.GPIO as GPIO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Connection name | |
connection adafruit | |
# Secure SSL/TLS | |
address io.adafruit.com:8883 | |
# adjust path as approriate to point to directory with PEM encoded .crt CA files | |
bridge_capath /etc/ssl/certs/ | |
# Insecure | |
# address io.adafruit.com:1883 |