Skip to content

Instantly share code, notes, and snippets.

View config
# Automatically generated file; DO NOT EDIT.
# Linux/arm 4.4.11 Kernel Configuration
tdack / readme.txt
Created May 8, 2016
Buildroot config for OrangePi Plus
View readme.txt
# board/orangepi/orangepi_plus/readme.txt
OrangePi Plus
This default configuration will allow you to start experimenting with the
buildroot environment for the OrangePi PC. With the current configuration
it will bring-up the board, and allow access through the serial console.
tdack / console.log
Last active Jan 10, 2016
Kivy Raspberry Pi installation
View console.log
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+
pi@raspberrypi ~ $ sudo apt-get install python-{pygments,docutils}
tdack /
Last active Jan 6, 2016 — forked from anonymous/
Bash script to upgrade your Ghost blog installation to the latest version
# 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
if [[ $# -eq 0 ]]; then
echo "Usage:"
echo " $0 <systemd|sysv>"
tdack / Makefile
Last active Dec 31, 2015
Commercial detection with silence for UK freeviewHD and Australian Freeview SD/HDSee for detailsRunning:Assuming you use the same locations, your 'Advert-detection command' (mythtv-setup/General/Page 8) should be: /usr/local/bin/ %JOBID% %VERBOSEMODE% --logl…
View Makefile
CC = g++
CFLAGS = -c -Wall -std=c++0x
LIBPATH = -L/usr/lib
TARGETDIR = /usr/local/bin
.PHONY: clean install
all: silence
silence: silence.o
tdack /
Last active Dec 27, 2015
PHP .htpasswd admin

Quick and dirty .htpasswd admin page for Apache 2.4 or greater.

This uses the newer authentication providers in Apache 2.4 to secure access to the page.

Add the vhost.conf snippet to your directive or server config.

Your .htpasswd file will need write permissions for the group or user that Apache is running as so it can be updated.

There's not many safety checks here, so be careful.

tdack / date.php
Last active Dec 27, 2015
Simple php script to run a shell command on a server when a button is pressed and return the result.
View date.php
$output = array();
$retvar = "";
if ($_GET['run'])
// 2>&1 redirects STDERR to STDOUT
exec("/bin/date 2>&1", $output, $retvar);
tdack / README
Created Sep 27, 2012
XML -> HTML using XSL in PHP
The parse-xml.php file uses the opf.xsl style sheet to read the book.opf XML file and output some minimal html for he description of the book.
The html produced is the contents of the <dc:description> tag surrounded by a <div>.
View pendulum.cpp
ofstream fSlots;;
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;
tdack /
Last active Aug 29, 2015
Grab Bigpond usage using Python

Telstra Bigpond Usage

A simple python script to grab the current usage from your Telstra Bigpond account.

Dependencies: python-requests

Change the username and password as appropriate