Skip to content

Instantly share code, notes, and snippets.

@oeon
oeon / scripts.gs
Created February 6, 2019 00:01
Google Apps Script for creating Google Calendar events via Fulcrum Webhooks with Location
// Google Apps Script for creating Google Calendar events via Fulcrum Webhooks
// replace your Fulcrum API token here
var token = "";
// leave createEventId as an empty string. We'll get it in createEvent()
var createEventId = "";
function doPost(e) {
return handleResponse(e);
}
@oeon
oeon / calc.js
Created January 10, 2019 04:52
Unix time calculation for Fulcrum date and time fields
var stop = new Date($stop_date.getFullYear(), $stop_date.getMonth(), $stop_date.getDate(), $stop_time.slice(0, 2), $stop_time.slice(3, 5), 0);
SETRESULT(stop.getTime());
@oeon
oeon / calc.js
Created January 10, 2019 04:51
Unix time calculation for Fulcrum date and time fields
var start = new Date($start_date.getFullYear(), $start_date.getMonth(), $start_date.getDate(), $start_time.slice(0, 2), $start_time.slice(3, 5), 0);
SETRESULT(start.getTime());
@oeon
oeon / scripts.gs
Created January 10, 2019 04:46
Google Apps Script for creating Google Calendar events via Fulcrum Webhooks
// Google Apps Script for creating Google Calendar events via Fulcrum Webhooks
// replace your Fulcrum API token here
var token = "";
var createEventId = "";
function doPost(e) {
return handleResponse(e);
}
@oeon
oeon / script.sh
Created October 12, 2018 21:36
use sed (gsed for mac/homebrew) to insert a header into .csv files & remove BOM
#!/bin/bash
for file in *.csv
do
# 1i means insert before line 1
gsed -i 1i"animals,numbers,colors" $file
echo "inserted header in $file!"
gsed -i "s/^\xef\xbb\xbf//" $file
echo "removed BOM in $file!"
done
@oeon
oeon / joes-pct-dreamin.geojson
Created June 20, 2018 04:49
A stretch of the Pacific Crest Trail that I'd like to travel.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oeon
oeon / # qgis3-dev - 2018-06-08_10-07-31.txt
Created June 8, 2018 18:37
qgis3-dev (qgis/qgisdev/qgis3-dev) on macOS 10.12.6 - Homebrew build logs
Homebrew build logs for qgis/qgisdev/qgis3-dev on macOS 10.12.6
Build date: 2018-06-08 10:07:31
@oeon
oeon / # qgis3-dev - 2018-06-08_03-46-42.txt
Created June 8, 2018 15:57
qgis3-dev (qgis/qgisdev/qgis3-dev) on macOS 10.12.6 - Homebrew build logs
Homebrew build logs for qgis/qgisdev/qgis3-dev on macOS 10.12.6
Build date: 2018-06-08 03:46:42
@oeon
oeon / # qgis3-dev - 2018-06-08_00-10-19.txt
Created June 8, 2018 10:32
qgis3-dev (qgis/qgisdev/qgis3-dev) on macOS 10.12.6 - Homebrew build logs
Homebrew build logs for qgis/qgisdev/qgis3-dev on macOS 10.12.6
Build date: 2018-06-08 00:10:19
@oeon
oeon / Code.gs
Last active April 13, 2018 00:09 — forked from bmcbride/Code.gs
Google Apps Script for exporting CSV files and photos from the Fulcrum Query API to a Drive folder
/**
Title: Google Apps Script for exporting CSV files from the Fulcrum Query API to a Drive folder
Notes: Be sure to manually run the exportData() function at least once to authorize the script. Set a timed trigger to automate exports.
Author: Bryan R. McBride
Contributor: Joe Larson, exportPhotos()
**/
var fulcrumToken = "abcdefghijklmnopqrstuvwxyz";
var fulcrumFormName = "My App";
var filesFolder = "1ByvB7rSq_Pi2AE_JvqRFm6zUETbdJ8dG";