Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/perl
use strict;
use warnings;
open my $fh, "<", $ARGV[0] or die "Couldn't open file";
my $tagStack = [];
my $typeStack = [];
my $en = 0;
@oloftus
oloftus / Base.html
Created September 2, 2016 18:07
One-Click Email Survey: Base.html
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body style="text-align:center;font-family:Arial, sans-serif;font-size:16px;">
<br/><br/>
<img src="http://frobo-static-hosting.co.uk/files/Wufoo_forms_logo.png" alt="Frobo" />
<br/><br/><br/>
</body>
@oloftus
oloftus / Post.gs
Created September 1, 2016 22:56
One-Click Email Survey: Post.gs
function doPost(e) {
var properties = PropertiesService.getScriptProperties();
var handshakeKey = properties.getProperty("handshakeKey");
if (e.parameter.HandshakeKey != handshakeKey) {
ContentService.createTextOutput("Error: Incorrect handshake key")
}
var spreadsheetId = properties.getProperty("spreadsheetId");
@oloftus
oloftus / Get.gs
Created September 1, 2016 22:55
One-Click Email Survey: Get.gs
var ALPHA_NUM = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
var EMAIL_COL = 2;
var KEY_COL = 1;
function rowExists(sheet, startRow, numRows, col, value) {
var range = sheet.getRange(startRow, col, numRows).getValues();
var values = range.map(function(itm) {
return itm[0];
});