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 PREFIX = 'prefix'; | |
const EXTERNAL_ID = 'docId'; | |
const TAB_NAME = 'tabName'; | |
const LOCAL_NAME = 'localTabName'; | |
const RANGE = false; | |
var documentProperties = PropertiesService.getDocumentProperties(); | |
function importFromDoc(prefix = false, externalDocumentId = false, tabName = false, localTab = false, range = false) { | |
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
sudo npm cache clean -f | |
sudo npm update npm -g | |
sudo npm install -g n | |
sudo n stable | |
sudo node -v | |
sudo npm -v |
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 mapNumbers = { | |
0 : [2, 1, "нуль"], | |
1 : [0, 2, "одна", "один"], | |
2 : [1, 2, "дві", "дві"], | |
3 : [1, 1, "три"], | |
4 : [1, 1, "чотири"], | |
5 : [2, 1, "п'ять"], | |
6 : [2, 1, "шість"], | |
7 : [2, 1, "сім"], | |
8 : [2, 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 exportSheetAsJSON() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); | |
var numCols = rows.getNumColumns(); | |
var values = rows.getValues(); | |
var output = ""; | |
output += "{\""+sheet.getName()+"\" : {\n"; | |
var header = values[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
// ==UserScript== | |
// @name Google Redirect Remove | |
// @id google_redirect_remove | |
// @namespace scripts.zachbrowne.com | |
// @description Remove URL redirection from google sites | |
// @license GPL v3 | |
// @include *://www.google.*/*q=* | |
// @include *://www.google.*/*tbs=* | |
// @include *://www.google.*/search?* | |
// @include *://www.google.*/webhp?* |
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
// AUTO GENERATE SIMPLE UNIQUE ID'S FOR NON-EMPTY ROWS | |
// | |
// Author: Carlos Perez, [email protected] | |
// | |
// Purpose: This Google Sheets script fires when any cell is edited and | |
// inserts a random (reasonably unique) UID of ID_LENGTH length | |
// into the specified ID_COLUMN. For instance if the first column in the | |
// sheet specified by SHEETNAME is the column where you would like the | |
// UID injected, then ID_COLUMN should be 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
/** | |
* ########################################################################### | |
* # Name: Hubspot Automation # | |
* # Description: This script let's you connect to Hubspot CRM and retrieve # | |
* # its data to populate a Google Spreadsheet. # | |
* # Date: March 11th, 2018 # | |
* # Author: Alexis Bedoret # | |
* # Modified by: Vitaliy Galushka # | |
* # Detail of the turorial: https://goo.gl/64hQZb # | |
* ########################################################################### |
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 parseFloat1(a) { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = ss.getActiveSheet(); | |
var range = sheet.getRange(a).getValues(); | |
var new_arr = []; | |
for (var i = 0; i < range.length; i++) { | |
var item = range[i] | |
var converted = parseFloat(item.toString().replace(/[^-?0-9.]/g, "")); | |
if (isNaN(converted)) |
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 RefreshImports() { | |
var lock = LockService.getScriptLock(); | |
if (!lock.tryLock(5000)) return; // Wait up to 5s for previous refresh to end. | |
var id = "[YOUR SPREADSHEET ID]"; | |
var ss = SpreadsheetApp.openById(id); | |
var sheet = ss.getSheetByName("[SHEET NAME]"); | |
var dataRange = sheet.getDataRange(); | |
var formulas = dataRange.getFormulas(); | |
var content = ""; |
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
// Maximum results to retrieve per api request: | |
var C_MAX_RESULTS = 250; | |
// When spreadsheet opens, this sets up the custom Jira and Story Cards menus, and the functions that they call when selected: | |
function onOpen() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var menuEntries = [{ | |
name: "Configure Jira", | |
functionName: "jiraConfigure" |
NewerOlder