Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python2
# Script inspired from https://gist.github.com/obscurerichard/3740206
import os
import sys
import subprocess
import argparse
import textwrap
@ramcq
ramcq / live_boot.c
Last active September 1, 2016 14:01
static gboolean
check_for_live_boot ()
{
GError *error = NULL;
gchar *cmdline = NULL;
gboolean live_boot = FALSE;
if (g_file_get_contents ("/proc/cmdline", &cmdline, NULL, &error))
{
g_printerr ("unable to read /proc/cmdline: %s\n", error->message);
@ramcq
ramcq / gist:6919a17a59d4b4be915d
Created March 23, 2016 13:57
extra plugin dir for GStreamer
Index: gstreamer-1.6.1/common/m4/gst-plugindir.m4
===================================================================
--- gstreamer-1.6.1.orig/common/m4/gst-plugindir.m4
+++ gstreamer-1.6.1/common/m4/gst-plugindir.m4
@@ -15,3 +15,20 @@ AC_DEFUN([AG_GST_SET_PLUGINDIR],
plugindir="\$(libdir)/gstreamer-$GST_API_VERSION"
AC_SUBST(plugindir)
])
+
+dnl AC_DEFINE EXTRA_PLUGINDIR to the full location where additional plug-ins
@ramcq
ramcq / evohome.py
Created November 8, 2015 16:38
collectd python plugin for evohome
# collectd python plugin for evohome
# Copyright 2015 Robert McQueen <robert@mcqueen.me.uk>
# GNU General Public License v2 or later, no warranty etc
#
# uses https://github.com/watchforstock/evohome-client to read temperatures and setpoints
# could be more smart in terms of keeping credentials and refreshing them when they time out rather than logging in every time
# supports multiple evohome devices
# ignores hot water
# patches welcome :)
@ramcq
ramcq / blocksync.py
Last active July 6, 2021 15:03 — forked from rcoup/blocksync.py
#!/usr/bin/env python
"""
Synchronise block devices over the network
Copyright 2006-2008 Justin Azoff <justin@bouncybouncy.net>
Copyright 2011 Robert Coup <robert@coup.net.nz>
Copyright 2012 Holger Ernst <info@ernstdatenmedien.de>
Copyright 2014 Robert McQueen <robert.mcqueen@collabora.co.uk>
License: GPL