Skip to content

Instantly share code, notes, and snippets.

View gloriouslyawkwardlife's full-sized avatar

Steven Buehler gloriouslyawkwardlife

  • Clermont, Florida
View GitHub Profile
@gloriouslyawkwardlife
gloriouslyawkwardlife / bouncie.wl
Last active September 9, 2024 15:56
Wolfram Language: Create a daily map from Bouncie API webhook data
(*
Requires creation of a webhook on https://bouncie.dev to post to an Apache CouchDB database exposed to the Internet.
Substitute '6984' as the port number if you prefer a secure connection after setting up SSL according to the Apache
CouchDB Instructions.
The 'tripData' view used here to retrieve just tripData entries is as follows in CouchDB:
function (doc) {
if (doc.eventType == 'tripData')
emit(doc.data, null);
@gloriouslyawkwardlife
gloriouslyawkwardlife / Faceboook_to_DayOne2.ps1
Last active January 6, 2024 18:27
Retrieves Facebook history as entries into the Mac version of DayOne
#!/usr/local/bin/pwsh
$access_token="<INSERT FACEBOOK ACCESS TOKEN HERE: https://developers.facebook.com/tools/accesstoken/"
$data = invoke-restmethod "https://graph.facebook.com/v18.0/me/posts?fields=title,application,backdated_time,caption,child_attachments,id,coordinates,created_time,description,event,full_picture,message,name,object_id,parent_id,place,scheduled_publish_time,status_type,story,type,updated_time,attachments,comments,link,permalink_url,reactions&limit=100&access_token=$access_token" -ErrorAction Stop
while ($true) {
foreach ($p in $data.data) {
if ($p.backdated_time -ne $null) {
$posttime = $p.backdated_time.toString('s').replace('T', ' ')
}
else {