Skip to content

Instantly share code, notes, and snippets.

View charlesdrews's full-sized avatar

Charles Drews charlesdrews

View GitHub Profile
@charlesdrews
charlesdrews / git-status-all.sh
Created May 21, 2019 13:33
Quick bash script to run `git status` on all the repo subdirectories of the current directory. Ignores subdirectories starting w/ "."
#!/bin/bash
find ./[^\.]* -maxdepth 0 -type d | while read dir; do
printf "=====================================\n$dir\n"
git --git-dir=$dir/.git --work-tree=$dir status
done
@charlesdrews
charlesdrews / README.md
Last active August 29, 2024 04:26
Local dev environment setup for Google Apps Script using Typescript

Setting up your local development environment for writing Google Apps Script projects using Typescript

Google Apps Script (GAS) is a superset of ES5, but does NOT include any ES6 features. Also, the browser-based GAS editor is not the best. To make GAS development less miserable, develop locally (i.e. not in the browser) using TypeScript instead!

Google's clasp tool will transpile your code from Typescript to GAS and upload to your GAS project where you can run it.

  1. Intall stuff!
/**
* Retrieve the "next" url from the Link header of the API's response
* @param linkHeaderValue
*/
private getNextUrlFromLinkHeader(linkHeaderValue: string): string {
const links = linkHeaderValue.split(",");
for (const link of links) {
if (link.indexOf("rel=\"next\"") > -1) {
const url = link.split("; ")[0];