Skip to content

Instantly share code, notes, and snippets.

View Strusovsky's full-sized avatar

Andrew Strusovsky Strusovsky

View GitHub Profile
@Strusovsky
Strusovsky / instagram_count_to_googe_sheet.js
Created August 23, 2020 14:32 — forked from JulienDev/instagram_count_to_googe_sheet.js
Track your Instagram followers over time with Google Sheets Scripts
// Your sheet name in the document
var sheetName = "Data";
// Your instagram user id
var user_id = "CHANGE-ME"; //find your id here : https://codeofaninja.com/tools/find-instagram-user-id
var instagram_base_url = "https://www.instagram.com/graphql/query/";
var following = "?query_hash=58712303d941c6855d4e888c5f0cd22f&variables=%7B%22id%22%3A%22" + user_id + "%22%2C%22first%22%3A24%7D"
var followers = "?query_hash=37479f2b8209594dde7facb0d904896a&variables=%7B%22id%22%3A%22" + user_id + "%22%2C%22first%22%3A24%7D"
var medias = "?query_hash=f2405b236d85e8296cf30347c9f08c2a&variables=%7B%22id%22%3A%22" + user_id + "%22%2C%22first%22%3A12%7D"
/*************** Hierarchical Sections *******************/
var folders = {
// "<name>" : JQueryObject (section)
};
var childMapping = {
// "PX-2": [
// "Sprint Planning"
// ],
@Strusovsky
Strusovsky / autoCreateDelete.js
Created March 7, 2020 07:46 — forked from mindyzwan/autoCreateDelete.js
Google Scripts Automation: Auto Create/Delete Tab
function createDeleteTabs() {
/* DASHBOARD---------------------------------------------------------------------------------------------------
Edit this section to change the dates tabs are created for and the range of data that will be cleared each time! */
var numberOfDaysForwardForNextTab = 17
var numberOfDaysBackwardForDeleteTab = 53
var rangeToClear = 'F5:CS'
// -------------------------------------------------------------------------------------------------------------
@Strusovsky
Strusovsky / wrapText.js
Created January 24, 2020 17:40 — forked from westc/wrapText.js
Wrap text by splitting the lines based on whitespace and a maximum number of characters.
function wrapText(str, opt_max) {
opt_max = Math.min(Math.max(1, ~~opt_max || 80), 200);
let rgx = new RegExp(`\\S{1,${opt_max}}|\\s{1,${opt_max}}`, 'g');
let lastPart, wasNotWS;
return (str.match(rgx) || []).reduce(function (lines, part, partIndex, parts) {
let isNotWS = /\S/.test(part);
if (isNotWS) {
let lineCount = lines.length;
let lastLine = lines[lineCount - 1];
let newLastLine;
@Strusovsky
Strusovsky / gsheets-search-engine.html
Created January 24, 2020 17:27 — forked from westc/gsheets-search-engine.html
A simple search engine that only uses JavaScript and Google sheets. NO DATABASE REQUIRED!
<!DOCTYPE html>
<html>
<head>
<title>Custom Search Engine Using Google Sheets</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.3/vue.min.js"></script>
<script type="text/javascript">
@Strusovsky
Strusovsky / gsheets-search-engine.html
Created January 24, 2020 17:06 — forked from landsurveyorsunited/gsheets-search-engine.html
A simple search engine that only uses JavaScript and Google sheets. NO DATABASE REQUIRED!
<!DOCTYPE html>
<html>
<head>
<title>Custom Search Engine Using Google Sheets</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.3/vue.min.js"></script>
<script type="text/javascript">

Google Apps Script Spreadsheet Utilities and Custom Functions#

These utilities are grouped into related files, for simpler copy & paste to your scripts.

ConvertA1.gs

A couple of helper functions to convert to & from A1 notation.

cellA1ToIndex( string cellA1, number index )

/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@Strusovsky
Strusovsky / .ru.md
Created October 6, 2019 14:38 — forked from oshliaer/.ru.md
Sort active range