This file contains 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"> | |
<head> | |
<title>Instant Google Custom Search Engine (CSE)</title> | |
<meta charset="utf-8"> | |
<meta name="description" content="Google Custom Instant"> | |
<link href="http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz" rel="stylesheet" type="text/css"> | |
<link rel="stylesheet" href="html5reset.css" type="text/css" media="screen"> | |
<link rel="stylesheet" href="style.css" type="text/css" media="screen"> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> |
This file contains 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
<?php | |
$formKey = "blahblahblah"; // ENTER YOUR OWN VALUE - you can find your formkey by going to your live form in the spreadsheet and copying the value from the url | |
$redirectUrl = "http://www.yoursite.com/thank-you/"; // ENTER YOUR OWN VALUE - the url you want to direct people to after they fill in the form | |
$dataUrl = "https://spreadsheets0.google.com/spreadsheet/pub?blahblahblah&single=true&gid=1&output=csv"; // ENTER YOUR OWN VALUE - for parallel sessions you need to publish the public sheet via the share settings. This url is not published in the live webpage source | |
// function to get external webpages/data | |
function getData($url){ | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
This file contains 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
<?php | |
$formKey = "blahblahblah"; // ENTER YOUR OWN VALUE - you can find your formkey by going to your live form in the spreadsheet and copying the value from the url | |
$redirectUrl = "http://www.yoursite.com/thank-you/"; // ENTER YOUR OWN VALUE - the url you want to direct people to after they fill in the form | |
$dataUrl = "https://spreadsheets0.google.com/spreadsheet/pub?blahblahblah&single=true&gid=1&output=csv"; // ENTER YOUR OWN VALUE - for parallel sessions you need to publish the public sheet via the share settings. This url is not published in the live webpage source | |
// function to get external webpages/data | |
function getData($url){ | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
This file contains 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 ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sumSheet = ss.getSheetByName("Readme/Settings"); | |
var REFERER = sumSheet.getRange("B9").getValue(); | |
var SEARCH_TERM = sumSheet.getRange("B10").getValue(); | |
var SEARCH_DURATION = sumSheet.getRange("B11").getValue(); | |
var NUMBER_OF_TWEETS = sumSheet.getRange("B12").getValue(); | |
var RESULT_TYPE = sumSheet.getRange("B13").getValue(); | |
function onOpen() { | |
var menuEntries = [ {name: "Test Collection", functionName: "testCollection"}, {name: "Run Now!", functionName: "collectTweets"} ]; |
This file contains 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
function getProtovisTwitterConnections(){ | |
// This code is a reworking of code taken from Tony Hirst's (@psychemedia) Friendviz | |
// http://ouseful.open.ac.uk/twitter/friendviz.html | |
// Usage: Select a row or column of twitter usernames from a sheet (without '@') then run this function | |
// This creates a new sheet called pData with data formatted for the Graphing Connections Between | |
// Recent Twitterers (Protovis Demo) gadget. To graph the results from the main spreadsheet select | |
// Insert -> Gadget and enter a Custom url to http://hosting.gmodules.com/ig/gadgets/file/108150762089462716664/friendviz.xml | |
// The data range for the gadget is pData!A1:B2 | |
var doc = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = doc.getActiveSheet(); |
This file contains 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
function doGet(e) { | |
try{ | |
var app = UiApp.createApplication(); | |
var mainPanel = app.createVerticalPanel(); | |
var emailTable = app.createFlexTable().setId("emailTable"); | |
app.add(mainPanel); | |
mainPanel.add(emailTable); | |
var mail = GmailApp.getInboxThreads(0, 10); | |
for (var i = mail.length; i > 0; i--) { | |
var msg = mail[i-1]; |
This file contains 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
/* | |
Copyright 2011 Martin Hawksey and Dito LLC | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains 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
// This code has been developed for Google Apps Script | |
/* | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
This file contains 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
/* | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains 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
function getProtovisTwitterConnections(){ | |
// This code is a reworking of code taken from Tony Hirst's (@psychemedia) Friendviz | |
// http://ouseful.open.ac.uk/twitter/friendviz.html | |
// Usage: Select a row or column of twitter usernames from a sheet (without '@') then run this function | |
// This creates a new sheet called pData with data formatted for the Graphing Connections Between | |
// Recent Twitterers (Protovis Demo) gadget. To graph the results from the main spreadsheet select | |
// Insert -> Gadget and enter a Custom url to http://hosting.gmodules.com/ig/gadgets/file/108150762089462716664/friendviz.xml | |
// The data range for the gadget is pData!A1:B2 | |
var doc = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = doc.getSheetByName("Summary") |