Skip to content

Instantly share code, notes, and snippets.

View chrisfinch's full-sized avatar

Chris Finch chrisfinch

View GitHub Profile
@chrisfinch
chrisfinch / gSheets send email
Last active August 25, 2016 20:03
Google Sheets script editor send email function
/*
This constant is written in column C for rows for which an email
has been sent successfully.
*/
function send_software_request() {
//MailApp.sendEmail("chris.finch@guardian.co.uk", "Running",""); //- use to test if script is running
var EMAIL_SENT = "EMAIL_SENT";
@chrisfinch
chrisfinch / index.js
Created August 29, 2013 13:34
Karma plugin code for loading a node.js module in to run time.
var path = require('path');
var createPattern = function(path) {
return {pattern: path, included: true, served: true, watched: false};
};
var framework = function(files) {
files.unshift(createPattern(path.resolve(require.resolve('imagediff'), '../imagediff.js')));
};
@chrisfinch
chrisfinch / gist:6367108
Created August 28, 2013 15:06
Gruntfile require.js optimisation config
// r.js concatenation and minification of javascript
requirejs: {
compile: {
options: {
name: "almond",
baseUrl: "lib/js/",
include: ['main'],
exclude: ['jquery'],
mainConfigFile: "lib/js/main.js",
out: "build/js/peaks.min.js",

channel_filter.ejs:

<div class="header">
  <p>
    Click channels to <span>remove</span> from results
  </p>
  <p class="toggles">
    <a class="button off all_off">All Off</a>
    <a class="button on all_on disabled">All On</a>
@chrisfinch
chrisfinch / snippets_search.md
Created December 10, 2012 16:02
Snippets Search Functionality

Snippets Search functionality

Programme search

  • Base search for programme name
  • Autocomplete functionality for programme name

Keyword Search

  • Base search for keyword