Skip to content

Instantly share code, notes, and snippets.

View agraebe's full-sized avatar

Alexander Graebe agraebe

  • California, USA
  • 15:40 (UTC -08:00)
View GitHub Profile
@agraebe
agraebe / v1-get-materia-info.schema.json
Created December 5, 2020 00:05
FF-VII Materia JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FF VII Materia",
"description": "Materia definition",
"type": "object",
"required": [
"name",
"type",
"description",
"availability",
@agraebe
agraebe / v2-info-docs.md
Last active December 25, 2021 06:05
v2/info endpoint documentation
{
  "peer_version": 385875968,
  "pox_consensus": "17f76e597bab45646956f38dd39573085d72cbc0",
  "burn_block_height": 16,
  "stable_pox_consensus": "8e0561978fc5506b68a589c402dad97e862edb59",
  "stable_burn_block_height": 15,
  "server_version": "blockstack-core 0.0.1 => 23.0.0.0 (, release build, linux [x86_64])",
  "network_id": 2147483648,
 "parent_network_id": 3669344250,
@agraebe
agraebe / connection-sample.py
Created January 8, 2020 23:12
Psycopg2 Aurora Connection Example
import psycopg2
Import os
DB_HOST = os.getenv("DB_HOST")
DB_PORT = os.getenv("DB_PORT")
DB_USER = os.getenv("DB_USER")
DB_PW = os.getenv("DB_PW")
DB_NAME = os.getenv("DB_NAME")
def lambda_handler(event, context):
@agraebe
agraebe / apis.json
Last active October 18, 2019 20:29
HyperTrack APIs.json spec
{
"name": "HyperTrack",
"description": "Build applications that track the movement of your business.",
"image": "https://docs.hypertrack.com/images/logo.png",
"tags": [
"tracking",
"business",
"location",
"workforce",
"logistics",
@agraebe
agraebe / hypertrack-swagger.json
Created October 18, 2019 19:47
HyperTrack Swagger 2.0 Spec
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "HyperTrack API",
"description": "# Postman collection for the [HyperTrack API](https://docs.hypertrack.com/)\n\n## Setting authorization\n\nAll API calls use Basic Auth. Please ensure to replace the variables {{AccountId}} and {{SecretKey}} with your own keys from the [HyperTrack dashboard](https://dashboard.hypertrack.com/setup).\n\n## Setting Device ID\nFor Trips for single device retrieval, please replace the variable {{DeviceID}} with yoru actual device ID.\n\n## Support\n\nIf you have any questions, please [reach out to us via email]([email protected]) or our [customer support slack channel](https://join.slack.com/t/hypertracksupport/shared_invite/enQtNDA0MDYxMzY1MDMxLWFlMmNkYmYxOTA4OTZiNTkxOTBiY2FmYjdiMWY1NWUwYWFlYjNhNmFiNTYxYWZhNDg3Mzg2NWJiYjc4NzEzNDE).",
"contact": {}
},
"host": "v3.api.hypertrack.com",
"basePath": "/",
@agraebe
agraebe / hypertrack-open-api-v3.json
Created October 18, 2019 00:05
HyperTrack OpenAPI v3 Spec
{
"openapi": "3.0.0",
"info": {
"title": "HyperTrack API",
"description": "# Postman collection for the [HyperTrack API](https://docs.hypertrack.com/)\n\n## Setting authorization\n\nAll API calls use Basic Auth. Please ensure to replace the variables {{AccountId}} and {{SecretKey}} with your own keys from the [HyperTrack dashboard](https://dashboard.hypertrack.com/setup).\n\n## Setting Device ID\nFor Trips for single device retrieval, please replace the variable {{DeviceID}} with yoru actual device ID.\n\n## Support\n\nIf you have any questions, please [reach out to us via email]([email protected]) or our [customer support slack channel](https://join.slack.com/t/hypertracksupport/shared_invite/enQtNDA0MDYxMzY1MDMxLWFlMmNkYmYxOTA4OTZiNTkxOTBiY2FmYjdiMWY1NWUwYWFlYjNhNmFiNTYxYWZhNDg3Mzg2NWJiYjc4NzEzNDE).",
"contact": {},
"version": "1.0"
},
"servers": [
{
@agraebe
agraebe / embed-trips-view.js
Last active September 30, 2019 20:09
Embed trips view
# Coding view instructions
const baseUrl = "https://embed.hypertrack.com/trips";
const tripId = "abc"
const publishableKey = "xyz";
# Embeddable widget for Get Devices Status
<iframe width="400px" height="400px" src=`{baseUrl}/{tripId}?publishable_key={publishableKey}` />
@agraebe
agraebe / filter-by-metadata.js
Created September 30, 2019 19:54
Filter embed view by metadata
# Coding view instructions
const baseUrl = "https://embed.hypertrack.com/devices";
const publishableKey = "xyz";
const metadataObject = {
vehicle_type: "scooter"
};
const metadataFilter = JSON.stringify(metadataObject);
@agraebe
agraebe / webhook-trip-geofence-enter.json
Created September 29, 2019 22:15
Trip webhook payload for geofence enter
{
"created_at": "2019-07-01T14:00:00.000000Z",
"data": {
"value": "geofence_enter",
"trip_id": "123E4567-E89B-12D3-A456-426655440000",
"trip_metadata": { "workerId": "123" },
"geofence_metadata": { "clientId": "abc" }
},
"device_id": "00112233-4455-6677-8899-AABBCCDDEEFF",
"type": "trip",
@agraebe
agraebe / trip-creation-geofences.sh
Created September 27, 2019 23:12
Create a trip with geofences
payload='{
"device_id": "<YOUR_DEVICE_ID>",
"geofences": [{
"geometry": {
"type": "Point",
"coordinates": [-121.3980960195712, 38.7930386903944]
},
"metadata": {
"stop_id": "12345XYZ",
"stop_name": "SF office"