This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Owlstone - Chemical Detection and Chemical Sensing</title> | |
<link href="https://plus.google.com/103452364153605968626" rel="publisher" /> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta http-equiv="x-dns-prefetch-control" content="on" /> | |
<link rel="dns-prefetch" href="//www.owlstone.net" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use sed to replace '==x.y' with '<x.y.999' | |
# and save results to a file | |
sed -r -e "s/==([0-9]+\.[0-9]+)(\..+)?/<\1.999/" requirements.txt > /tmp/requirements2.txt | |
# It works by transforming the file like this: | |
# Django==1.4.8 >> Django<1.4.999 | |
# Jinja2==2.5 >> Jinja2<2.5.999 | |
# M2Crypto==0.19.1 >> M2Crypto<0.19.999 | |
# MySQL-python==1.2.5 >> MySQL-python<1.2.999 | |
# Pillow==2.5.1 >> Pillow<2.5.999 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var where=document.location.toString();if(where.indexOf('envisage-system.co.uk')>=0){document.location=where.replace('envisage-system.co.uk','envisage-staging.co.uk');}if(where.indexOf('envisage-staging.co.uk')>=0){document.location=where.replace('envisage-staging.co.uk','envisage-system.co.uk');}})() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add this javascript to your Zendesk Help Center pages | |
(function($) { | |
$(function() { | |
// for all attachment links whose URLs end with .pdf (case sensitive)... | |
var pdfs = $('.attachments a[href$=".pdf"]'); | |
var eleBody = $('div.article-body'); | |
if (pdfs.length > 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys, csv, os, shutil | |
pattern = "Vol09-%04d.jpg" | |
original_filename = sys.argv[1] | |
output_path = sys.argv[2] | |
output_csv = os.path.join(output_path, "original_filenames.csv") | |
next_index = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SerialPort = require('serialport').SerialPort; | |
var xbee_api = require('xbee-api'); | |
var C = xbee_api.constants; | |
var Q = require('q'); | |
// following settings work for me on my Raspberry pi, your config may differ! | |
var xbeeAPI = new xbee_api.XBeeAPI({ | |
api_mode: 1 | |
}); | |
var serialport = new SerialPort("/dev/ttyAMA0", { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def mozzicon(md5): | |
# Inspired by (!) https://github.com/cupcake/sigil | |
# return a 5 by 5 grid of divs with horizontal plane of symmetry | |
# (css used to rotate by 90deg) | |
# md5 is a string like "9eadbe04ba0a832eecbd0a27f563e0a6" | |
# use first char of hash to pick a color from 7 | |
colors = ('2d4fff', 'feb42c', 'e279ea', '1eb3fd', 'e84d41', '31cb73', '8d45aa', ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// see http://googleappsdeveloper.blogspot.co.uk/2011/07/gmail-snooze-with-apps-script.html | |
// Should be set to run every day at midnight, and moves emails one label 'nearer' to the inbox | |
var MARK_UNREAD = false; | |
var ADD_UNSNOOZED_LABEL = true; | |
function getLabelName(i) { | |
return "Snooze/Snooze " + i + " days"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import tzinfo, timedelta, datetime | |
import calendar | |
class UTC(tzinfo): | |
"""UTC""" | |
def utcoffset(self, dt): | |
return timedelta(0) | |
def tzname(self, dt): | |
return "UTC" | |
def dst(self, dt): | |
return timedelta(0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var collapsed_by_default = false; // set this to true if you prefer collapsed by default | |
function HideCategory(id, IsAgent, animation) { | |
// Function hides category | |
$j("div#category_" + id).hide(animation); | |
SetDownArrow(id, IsAgent); | |
$j.cookie('hide_category_' + id, 'yes', { expires: 180 }); | |
$j("div#category_header_" + id).attr("onclick", "ShowCategory(" + id + "," +IsAgent+ ",'blind')"); | |
}; |