Skip to content

Instantly share code, notes, and snippets.

matthewrknoll

Block or report user

Report or block matthewrknoll

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@matthewrknoll
matthewrknoll / Code.gs
Created Jan 24, 2017
Automatically include your latest Tweet in your Gmail signature.
View Code.gs
// Grabs my latest tweet 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 = data[0].id_str;
// Grabs embed code for my latest tweet. Would look much prettier if Gmail could render it properly.
var response = UrlFetchApp.fetch('https://publish.twitter.com/oembed?url=https://twitter.com/Interior/status/'+id);
var json = JSON.parse(response);
var text = json.html;
@matthewrknoll
matthewrknoll / Code.gs
Created Jan 19, 2017
Beliefs Inventory - Self Grading Google Form
View Code.gs
function onFormSubmit(e) {
//Gets the incoming form response
var formResponse = e.response;
//Puts the response from each question into an array
var itemResponses = formResponse.getItemResponses();
//Gets the respondent's email address
var email = formResponse.getRespondentEmail();
//Extracts the first and last name from the response
var name = itemResponses.splice(0, 2);
//An array containing how many dots are on the paper form in sequential order
You can’t perform that action at this time.