Skip to content

Instantly share code, notes, and snippets.

View adrian-cg's full-sized avatar

Adrian Castellanos Gutierrez adrian-cg

  • Google
  • Austin, TX
View GitHub Profile
public abstract class JSONUnkownFields {
public Map<String,Object> jsonFields;
protected abstract void parseKnownFields;
public JSONUnkownFields(String jsonString) {
jsonFields = (Map<String, Object>)JSON.deserializeUntyped(jsonString);
parseKnownFields();
}
@adrian-cg
adrian-cg / Code.gs
Last active January 3, 2021 19:08 — forked from clayperez/Code.gs
AUTO-Generate Unique IDs in Google Sheets
// AUTO GENERATE SIMPLE UNIQUE ID'S FOR NON-EMPTY ROWS
//
// Author: Carlos Perez, clayperez@gmail.com
//
// Purpose: This Google Sheets script fires when any cell is edited and
// inserts a random uuid (generated via Google Sheets's provided getUuid utility)
// 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.
//