Skip to content

Instantly share code, notes, and snippets.

@Ryderpro
Ryderpro / playerHID.js
Last active March 6, 2019 03:59
Beat IoT device. Start, pause, and stop music playing iPhone with a PuckJS.
/*
Custom Beat IoT device. Start, pause, and stop music playing iPhone with a PuckJS.
This source code is an alternative to BLE HID. BLE HID is great and offers devices
a Bluetooth integration that lets a device simulate media, keyboard, mouse buttons.
Unfortunately, iPhones do not support BLE HID at the system level that is required,
but your macOS laptop or android device can. More on BLE HID here -
https://learn.sparkfun.com/tutorials/bluetooth-basics/bluetooth-profiles
This device intends to operate as a faux BLE HID through "Diny" [an iOS app].
@Ryderpro
Ryderpro / sheetformulas.md
Last active August 23, 2020 21:11
Helpful Google Sheet Formulas

Helpful Google Sheet Formulas

Convert ISO DateTime into date value

A1 = "2019-01-01T00:20:00"
=datevalue(left(A1,10))+TIMEVALUE(mid(A1,12,8))
returns 43466.01389

Convert ISO DateTime into date with inherited cell format

A1 = "2019-01-01T00:20:00"
=TO_DATE(datevalue(left(a1,10))+TIMEVALUE(mid(a1,12,8)))

@Ryderpro
Ryderpro / postLead.js
Created September 26, 2018 01:42
Transform Squarespace leads in Google Sheets to TripleSeat form leads.
/**
* Post SquareSpace form entry to TripleSeat Form API.
*
* 0a. SquareSpace is connected to the SquareSpace form sheet.
* 0b. When a user makes a form entry in SquareSpace it is sent to a Google Sheet
*
* 1. This is a special function that looks for rows in this GoogleSheet that have not been "sent".
* 2. This function then sends a POST request with the form data to TripleSeat.
* 3. Then this function updates "TripleSeat Status" field to "Sent" in each row that was sent to TripleSeat.
* 4. Create a trigger in this project to run this function every 5 minutes, add yourself for script failure notifications
@Ryderpro
Ryderpro / trackpadToggle.scpt
Created August 29, 2017 06:31
Toggle Built in Trackpad
tell application "System Preferences"
reveal anchor "Mouse" of pane id "com.apple.preference.universalaccess"
activate
tell application "System Events"
tell process "System Preferences"
click checkbox 3 of window 1
set valueCheckBox to value of checkbox 3 of window 1
end tell
end tell
quit
@Ryderpro
Ryderpro / OrbitControls.js
Created January 21, 2016 07:15 — forked from mrflix/OrbitControls.js
Three.OrbitControls for multiple instances on a page.Usage: controls = new THREE.OrbitControls(camera, document, renderer.domElement); Based on: http://threejs.org/examples/js/controls/OrbitControls.js
/**
* @author qiao / https://github.com/qiao
* @author mrdoob / http://mrdoob.com
* @author alteredq / http://alteredqualia.com/
* @author WestLangley / http://github.com/WestLangley
* @author erich666 / http://erichaines.com
* @author mrflix / http://felixniklas.de
*
* released under MIT License (MIT)
*/