Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexander Graebe agraebe

View GitHub Profile
View v1-get-materia-info.schema.json
{
"$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 Nov 12, 2020
v2/info endpoint documentation
View v2-info-docs.md
{
  "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 Jan 8, 2020
Psycopg2 Aurora Connection Example
View connection-sample.py
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 Oct 18, 2019
HyperTrack APIs.json spec
View apis.json
{
"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 Oct 18, 2019
HyperTrack Swagger 2.0 Spec
View hypertrack-swagger.json
{
"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](help@hypertrack.com) 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 Oct 18, 2019
HyperTrack OpenAPI v3 Spec
View hypertrack-open-api-v3.json
{
"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](help@hypertrack.com) 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 Sep 30, 2019
Embed trips view
View embed-trips-view.js
# 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 Sep 30, 2019
Filter embed view by metadata
View filter-by-metadata.js
# 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 Sep 29, 2019
Trip webhook payload for geofence enter
View webhook-trip-geofence-enter.json
{
"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 Sep 27, 2019
Create a trip with geofences
View trip-creation-geofences.sh
payload='{
"device_id": "<YOUR_DEVICE_ID>",
"geofences": [{
"geometry": {
"type": "Point",
"coordinates": [-121.3980960195712, 38.7930386903944]
},
"metadata": {
"stop_id": "12345XYZ",
"stop_name": "SF office"