Skip to content

Instantly share code, notes, and snippets.

@avian2
avian2 / gist:666a01cc92a8f5512001
Last active August 29, 2015 14:00
Nicer limit display for Munin graphs
Index: munin-2.0.6/master/lib/Munin/Master/GraphOld.pm
===================================================================
--- munin-2.0.6.orig/master/lib/Munin/Master/GraphOld.pm 2014-05-04 00:39:12.000000000 +0200
+++ munin-2.0.6/master/lib/Munin/Master/GraphOld.pm 2014-05-04 00:42:49.620605473 +0200
@@ -1161,7 +1161,8 @@
. "#" . (
$single_value
? "ff0000"
- : $COLOUR[($field_count - 1) % @COLOUR]));
+ : $COLOUR[($field_count - 1) % @COLOUR])
cmdline = ['rsync', '--delete', '-az', src_path, dst_path]
self.log.debug("rsync from %r to %r: %r" % (src_path, dst_path, cmdline))
self.subprocess.check_call(cmdline)
@avian2
avian2 / gist:1860669
Created February 18, 2012 19:02
HTTPS Everywhere for Net::Zemanta::Suggest
package Net::Zemanta::Suggest::HTTPS;
use strict;
use base qw( Net::Zemanta::Suggest );
sub suggest {
my $self = shift;
my $suggestions = $self->SUPER::suggest(@_);