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
const sheetToObjects = (sheet, headerRow=1) => { | |
const arrayToObject = (array,headers) => { | |
return array.reduce((obj,value,index) =>{ | |
return {...obj,[headers[index]]: value} | |
}, {}) | |
} | |
const sheetValues = sheet.getDataRange().getValues() | |
const dataValues = sheetValues.slice(headerRow-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
// Navigate to /usr/share/X11/xkb/symbols/us | |
// Adjust the Russian section to match below and reboot | |
// Change your keyboard layout to include the "Russian (US, Phonetic)" | |
// See layout image at http://winrus.com/print_e.htm | |
// phonetic layout for Russian letters on an US keyboard | |
// by Ivan Popov <[email protected]> 2005-07-17 | |
// level3 modifier is a shortcut to the "us" meaning of the keys where | |
// we place cyrillic letters, handy for accessing the corresponding |
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 parse() { | |
let people = document.querySelectorAll("._5qo4"); | |
for (let i = 0; i < people.length; i++) { | |
const aElement = people[i].querySelector("a._5q6s"); | |
let id = null; | |
let vanity = null; | |
if (aElement != null) { | |
const hovercardLink = aElement.getAttribute("data-hovercard"); | |
const idRegex = new RegExp("^/ajax/hovercard/user.php\\?id=(\\d{1,})&.{1,}", "g"); | |
id = idRegex.exec(hovercardLink)[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
function parse() { | |
let people = document.querySelectorAll("._43q7"); | |
for (let i = 0; i < people.length; i++) { | |
const profile = people[i].childNodes[0].href | |
const tooltip = people[i].childNodes[0].getAttribute("data-tooltip-content"); | |
const monthRegex = new RegExp("\\((\\d{1,2})/\\d{1,2}\\)$", "g"); | |
const dayRegex = new RegExp("\\(\\d{1,2}/(\\d{1,2})\\)$", "g"); | |
const monthMatch = monthRegex.exec(tooltip); | |
const dayMatch = dayRegex.exec(tooltip); | |
const month = monthMatch == null ? null : monthMatch[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
function createFormTrigger() { | |
var triggerFunctionName = "addFormResponseIdAndUrl_"; | |
deleteAllExistingTriggers_(); | |
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); | |
ScriptApp.newTrigger(triggerFunctionName) | |
.forSpreadsheet(spreadsheet) | |
.onFormSubmit() | |
.create(); | |
} |
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 splitRangeIntoRows(range) { | |
const sheet = range.getSheet(); | |
const firstRow = range.getRow(); | |
const lastRow = firstRow + range.getNumRows() - 1; | |
let rows = []; | |
for (let rowIndex = firstRow; rowIndex <= lastRow; rowIndex++) { | |
rows.push(sheet.getRange(`${rowIndex}:${rowIndex}`)); | |
} | |
return rows; | |
} |