Skip to content

Instantly share code, notes, and snippets.

#!/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
@lozzd
lozzd / fitb_weathermap.patch
Created October 11, 2012 09:22
FITB support for PHP Weathermap
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 October 11, 2012 09:09
FITB support for PHP Weathermap
<?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 November 14, 2011 17:46
gmetric-ldap.py
#!/usr/bin/python
import ldap
import pickle
import os
import sys
import time
def load_stats(stats_file):
@lozzd
lozzd / coffeeinstock.php
Created February 22, 2011 10:37
Checks the Nescafe Dolce Gusto website to see if a certain product is in stock
<?
#
# 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";