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
// Grabs my latest tweet favorited using the handy TwtrService wrapper by +MartinHawksey - https://goo.gl/2it7yb | |
function getLatestTweet() { | |
var data = TwtrService.get("statuses/user_timeline", {screen_name: /*"YourTwitterHandle(without the @)"*/, count: 1}); | |
var id = false; | |
for (var i = 0; i < data.length; i++){ | |
if (data[i].favorited) { | |
id = data[i].id_str; | |
break; | |
} | |
} |
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
function fetchFeedItemCount(url,optType) { | |
var type = optType || "feed"; | |
var output = []; | |
//var url = "http://confessionsofalearningtechnologist.blogspot.com/feeds/posts/default?alt=rss"; | |
// little switch to get rss2 feed for blogger | |
if (/\/posts\/default$/.test(url)){ | |
url += "?alt=rss"; | |
} | |
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
function doGet(e) { | |
var rss='<?xml version="1.0" encoding="utf-8"?>'; | |
rss+='<feed xmlns="http://www.w3.org/2005/Atom">'; | |
rss+='<title>Frases y citas célebres - NexCono </title>'; | |
rss+='<link href="http://nexcono.appspot.com"/>'; | |
rss+='<author><name>NexCono</name></author>'; | |
rss+='<id></id>'; | |
var app=SpreadsheetApp.openById("1tLSL5BqnTAM6VsgyF355DJJe50r0ZQbfunTXAUFj_nE"); | |
var data=app.getDataRange().getValues(); |
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
// Creates new spreadsheets based on a column containing email addresses | |
// in the starting spreadsheet. | |
// Each new spreadsheet will contain the full set of rows for that email address. | |
// It will then be shared with that email address and a link emailed. | |
var EMAIL_COLUMN = 2; //Use the number: A=1,B=2,Z=26 etc | |
var ALSO_SHARE_WITH = ""; // Add any additional addresses here. Separated multiples with commas. | |
var NUM_HEADER_ROWS = 1; // The number of header rows. | |
// Do not change anything below this line | |
// 24 Nov 2010 - test mode works correctly after Google changes (session broke after Browser.msgBox) |
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
function onEdit() { | |
// moves a row from any sheet to an archive sheet when a magic value is entered in a column | |
var columnNumberToWatch = /* column Q */ 3; // column A = 1, B = 2, etc. | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var as = SpreadsheetApp.getActiveSheet(); | |
var cell = as.getActiveCell(); | |
var track_val = cell.getValue().toUpperCase(); // If the names of sheets needed exactly skip .toUpperCase() | |
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 ONE_S = 1000, | |
ONE_M = 60*ONE_S, | |
ONE_H = 60*ONE_M, | |
RUN_EVERY = 5*ONE_M, | |
SLEEP_TIME = 30*ONE_M, | |
CHECK_URL = 'http://www.SITE.com', | |
NOTIFY_MAIL = '[email protected]', | |
NOTIFY_CALENDAR = '[email protected]'; |
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
function assignEditUrls() { | |
var form = FormApp.openById('yourFormKey'); | |
//enter form ID here | |
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('yourWorksheetName'); | |
//Change the sheet name as appropriate | |
var data = sheet.getDataRange().getValues(); | |
var urlCol = ; // column number where URL's should be populated; A = 1, B = 2 etc | |
var responses = form.getResponses(); |
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
// Simple function to send Weekly Status Sheets to contacts listed on the "Contacts" sheet in the MPD. | |
// Load a menu item called "Project Admin" with a submenu item called "Send Status" | |
// Running this, sends the currently open sheet, as a PDF attachment | |
function onOpen() { | |
var submenu = [{name:"Send Status", functionName:"exportSomeSheets"}]; | |
SpreadsheetApp.getActiveSpreadsheet().addMenu('Project Admin', submenu); | |
} | |
function exportSomeSheets() { |
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
#!/bin/bash | |
# CHANGE THESE | |
auth_email="[email protected]" | |
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings | |
zone_name="example.com" | |
record_name="www.example.com" | |
# MAYBE CHANGE THESE | |
ip=$(curl -s http://ipv4.icanhazip.com) |
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
function getGeocodingRegion() { | |
return PropertiesService.getDocumentProperties().getProperty('GEOCODING_REGION') || 'au'; | |
} | |
function addressToPosition() { | |
// Select a cell with an address and two blank spaces after it | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var cells = sheet.getActiveRange(); | |
var addressColumn = 1; |