Skip to content

Instantly share code, notes, and snippets.

#!/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
##
@tdack
tdack / rrd2D3.js
Created February 2, 2015 05:52
Output data from javascriptrrd for use with D3js
// 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}]
@tdack
tdack / gist:59b1ff3a1eef77df7f79
Created December 17, 2014 06:46
MetricsGraphics test case
D1=[{"time":"2014-12-10T07:00:00.000Z","val":23963.329444444444},{"time":"2014-12-10T08:00:00.000Z","val":0},{"time":"2014-12-10T09:00:00.000Z","val":7350.143697764535},{"time":"2014-12-10T10:00:00.000Z","val":1230.5423714379733},{"time":"2014-12-10T11:00:00.000Z","val":2680.6423191974077},{"time":"2014-12-10T12:00:00.000Z","val":5110.947544547842},{"time":"2014-12-10T13:00:00.000Z","val":2972.8870586764733},{"time":"2014-12-10T14:00:00.000Z","val":14244.08293326015},{"time":"2014-12-10T15:00:00.000Z","val":4154.984313596681},{"time":"2014-12-10T16:00:00.000Z","val":21274.571393023052},{"time":"2014-12-10T17:00:00.000Z","val":12827.169734152581},{"time":"2014-12-10T18:00:00.000Z","val":767.7136190974885},{"time":"2014-12-10T19:00:00.000Z","val":2.654181912484959},{"time":"2014-12-10T20:00:00.000Z","val":1.4527777777777775},{"time":"2014-12-10T21:00:00.000Z","val":659.5492520499265},{"time":"2014-12-10T22:00:00.000Z","val":547.1229701722958},{"time":"2014-12-10T23:00:00.000Z","val":1.6424999999999998},{"time"
@tdack
tdack / README.md
Last active August 29, 2015 14:07
Apache MythWeb reverse proxy

Apache reverse proxy configuration for MythWeb over HTTPS

@tdack
tdack / lcdui.py
Last active August 29, 2015 14:06 — forked from ufux/lcdui.py
import smbus
import getopt
import sys
from time import *
from time import gmtime, strftime
# TODO: Factor out all device_write calls to some PCF8574 specific module ...
# will be different with another io expander
# communication from expander to display: high nibble first, then low nibble
@tdack
tdack / smb.conf
Created August 6, 2014 15:03
BeagleBone Black smb.conf for Cloud 9 IDE to enable access from other systems. This is insecure as it allows a guest connecting to the samba share root access to the /var/lib/cloud9 directory - but you already get this through the Cloud9 browser IDE
################################################################################
# samba.conf
# This configuration file allows you to customize the samba shares
# available from your machine
[global]
server string = BeagleBone Black Cloud 9 IDE
workgroup = WORKGROUP
netbios name = %h
/*
The MIT License (MIT)
Copyright (c) 2014 Ismael Celis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@tdack
tdack / initramfs.conf
Created July 3, 2014 01:07
/etc/initramfs-tools/initramfs.conf
MODULES=dep
COMPRESS=gzip
DEVICE=wlan0
BOOT=local
@tdack
tdack / iscsi
Created July 3, 2014 01:05
/usr/share/initramfs-tools/scripts/local-top/iscsi
PREREQ="wlan"
@tdack
tdack / iscsi.initramfs
Created July 3, 2014 00:58
/etc/iscsi/iscsi.initramfs
# iscsi name for the RPi
ISCSI_INITIATOR=iqn.1993-08.lan.internal.rpi:01:6df87742251d
# iscsi target (eg: your NAS)
ISCSI_TARGET_NAME=iqn.2004-04.com.qnap:ts-419pii:iscsi.rpi.d55618
ISCSI_TARGET_IP=192.168.1.100