Skip to content

Instantly share code, notes, and snippets.

@lozzd
lozzd / fitb_weathermap.patch
Created Oct 11, 2012
FITB support for PHP Weathermap
View fitb_weathermap.patch
diff -upN weathermap_clean/editor.js weathermap/editor.js
--- weathermap_clean/editor.js 2010-03-04 10:45:19.000000000 +0000
+++ weathermap/editor.js 2011-10-11 11:49:15.000000000 +0000
@@ -127,6 +127,7 @@ function attach_click_events()
jQuery('.wm_cancel').click(cancel_op);
jQuery('#link_cactipick').click(cactipicker).attr("href","#");
+ jQuery('#link_fitbpick').click(fitbpicker).attr("href","#");
jQuery('#node_cactipick').click(nodecactipicker).attr("href","#");
@lozzd
lozzd / fitb-pick.php
Created Oct 11, 2012
FITB support for PHP Weathermap
View fitb-pick.php
<?php
$mapdir='configs';
# FITB Settings
$fitb_base = '/var/www/fitb';
$fitb_url = 'http://fitb.yourdomain.com/';
$rra_path = '/var/lib/fitb/rrds/';
# The FITB database details
@lozzd
lozzd / gist:1364579
Created Nov 14, 2011
gmetric-ldap.py
View gist:1364579
#!/usr/bin/python
import ldap
import pickle
import os
import sys
import time
def load_stats(stats_file):
@lozzd
lozzd / coffeeinstock.php
Created Feb 22, 2011
Checks the Nescafe Dolce Gusto website to see if a certain product is in stock
View coffeeinstock.php
<?
#
# Checks the Nescafe Dolce Gusto website to see if your pods are back in stock
# by Laurie Denness
#
#
# This program sends an email to THIS ADDRESS:
$email = "your.email@here.com";
View hhvm_stop.sh
#!/bin/bash
# A wrapper for our HHVM implementation to be called from systemd which
# performs the task of cleanly shutting down HHVM without us affecting
# any traffic
# Move the health check file out of the way, which will make the load balance depool this node
echo "Flipping status.php to status.php.disabled..."
mv /var/www/status.php /var/www/status.php.disabled
You can’t perform that action at this time.