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
/** * @OnlyCurrentDoc */ | |
function moveColumns() { | |
// get sheet | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
// select columns to be moved ('collegename' & 'shoesize') | |
var columnsToMove = sheet.getRange("E1:F1"); |
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
// ==UserScript== | |
// @name Auto Archive Redirect | |
// @namespace Evan Reichard | |
// @version 0.0.3 | |
// @match *://*/* | |
// @grant GM.xmlhttpRequest | |
// @grant GM.openInTab | |
// @noframes | |
// @run-at document-start | |
// ==/UserScript== |
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
// this is pretty quick and rough.. but it works | |
// script.google.com | |
// settings to allow editing the appscript.json | |
// set these two files | |
// then hit Run with function 'run' | |
const all = {}; | |
function run() { |
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
javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{ | |
default: Turndown | |
}, { | |
default: Readability | |
}]) => { | |
/* Optional vault name */ | |
const vault = ""; | |
/* Optional folder name such as "Clippings/" */ |
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
// preamble: public domain; no warranty | |
// | |
// this is a toy -- it is slow, cannot handle unicode, keys w/ | |
// spaces, nested keys, natural ordering, etc. | |
// orderBy('key1 [asc|1|desc|-1][, key2 [asc|1|desc|-1]][, etc]') | |
// | |
// write sql-like sort orders for arrays of objects, e.g.: | |
// |
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
async function onTrack(event, settings) { | |
if (event.event !== settings.eventName) { | |
return; | |
} | |
const product = event.properties.products[0]; | |
const itemPurchased = `${product.brand} ${product.name}`; | |
const Body = `Thank you for purchasing ${itemPurchased} from our site. We will follow-up with the tracking details shortly.`; | |
const To = settings.twilioDestinationNumber; |
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 fetch(url,options2) { | |
if (options2) { | |
if (options2.body) { | |
options2.payload = options2.body.toString("binary"); | |
options2.body = undefined; | |
} | |
} | |
return new Promise(function (resolve, reject) { | |
try { | |
var data = UrlFetchApp.fetch(url, options2); |
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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: orange; icon-glyph: quote-right; | |
// Change these to your usernames! | |
const user = "spencer" | |
const jike = "4DDA0425-FB41-4188-89E4-952CA15E3C5E" | |
const telegram = "realSpencerWoo" | |
const github = "spencerwooo" |
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
// Utility functions for Airtable Automations | |
/** | |
* @param {string} url | |
* @param {Base} [forBase=base] | |
*/ | |
function getTableFromURL(url, forBase) { | |
let root = forBase ? forBase : base | |
let found = url.match(/^https?:\/\/airtable.com\/(?<tableID>[^\/]+)/) | |
return root.getTable(found.groups.tableID) |
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) { | |
Logger.log(e); | |
var op = e.parameter.action; | |
var ss = SpreadsheetApp.open(DriveApp.getFileById("YOUR_SPREADSHEET_ID")); | |
var sn = "YOUR_SHEET_NAME"; | |
var sheet = ss.getSheetByName(sn); | |
if (op == "insert") | |
return insert_value(e, sheet); |