Skip to content

Instantly share code, notes, and snippets.

@noctivityinc
Created June 24, 2018 14:31
Show Gist options
  • Save noctivityinc/bcbd3d2e4a9cbac8735e68b112fdd984 to your computer and use it in GitHub Desktop.
Save noctivityinc/bcbd3d2e4a9cbac8735e68b112fdd984 to your computer and use it in GitHub Desktop.
base64string = '...'
output = LogDecoder.new(base64string)
p output
[
{timestamp_epoch: 1529805565, timestamp_datetime: "Sun, 24 Jun 2018 01:59:25 +0000", event: "BATTERY_VOLTAGE_PERCENT_REMAINING", data: nil},
{timestamp_epoch: 1529808426, timestamp_datetime: "Sun, 24 Jun 2018 02:47:06 +0000", event: "EVENT_BLE_DISCONNECTED", data:nil},
{timestamp_epoch: 1529808427, timestamp_datetime: "Sun, 24 Jun 2018 02:47:07 +0000", event: "BATTERY_PERCENT_REMAINING", data: "0"},
{timestamp_epoch: 1529808430, timestamp_datetime: "Sun, 24 Jun 2018 02:47:10 +0000", event: "EVENT", data: "29 > than 29"}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment