Skip to content

Instantly share code, notes, and snippets.

View nflint's full-sized avatar

Nate Flint nflint

View GitHub Profile
@jakebathman
jakebathman / jsonToCsv.php
Last active June 5, 2022 21:02 — forked from Kostanos/json-to-csv.php
A function to convert a JSON string (or a PHP array) to a CSV file or CSV string echoed to the browser
<?php
/*
*
* Based on (forked from) the work by https://gist.github.com/Kostanos
*
* This revision allows the PHP file to be included/required in another PHP file and called as a function, rather than focusing on command line usage.
*
* Convert JSON file to CSV and output it.
*
* JSON should be an array of objects, dictionaries with simple data structure
@Diana-Pham
Diana-Pham / listAllFileDetails.gs
Last active September 13, 2023 18:50
Script to list all files in your Google Drive (in a Google Sheet)
function createTimeDrivenTriggers() {
ScriptApp.newTrigger('listFilesInDrive') //run "listFilesInDrive()" every 5 minutes
.timeBased()
.everyMinutes(5) //Runs every 5 minutes
.create();
};
function listFilesInDrive() {
var scriptProperties = PropertiesService.getScriptProperties();
var MAX_FILES = 3; //use a safe value, don't be greedy!