Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeromy Evans jeromyevans

  • California
View GitHub Profile
@jeromyevans
jeromyevans / interactive-log.txt
Created Nov 20, 2016
Fitbit Aria Interactive Terminal
View interactive-log.txt
Built on Feb 29 2016 15:11:54
Config lost - RTC invalid - external reset/power failure
04003660: 20 f8 5e a
b 21 55 ff ff 39 35 30 45
04003680: 45 41 41 44 37 32 42 30 36 35 46 36 43 39 34 36 36 43 37 30 43 44 41 3
9 42 39 37 41 93 2c 80 00
040036a0: 01 02 ff ff
Flojo App version 39, WFW version 2c0200
Boot time 0
@jeromyevans
jeromyevans / measurement.txt
Last active Nov 20, 2016
Fitbit Aria Terminal Log - Full measurement test
View measurement.txt
Built on Feb 29 2016 15:11:54
04003660: 20 f8 5e a
b 21 55 ff ff 39 35 30 45
04003680: 45 41 41 44 37 32 42 30 36 35 46 36 43 39 34 36 36 43 37 30 43 44 41 3
9 42 39 37 41 93 2c 80 00
040036a0: 01 02 ff ff
Flojo App version 39, WFW version 2c0200
Boot time 1456760456
Time now 1456760456
@jeromyevans
jeromyevans / power-on-and-hold.txt
Last active Nov 20, 2016
Fitbit ARIA Terminal Power-on and Hold Test
View power-on-and-hold.txt
Built on Feb 29 2016 15:11:54
04003660: 20 f8 5e a
b 21 55 ff ff 39 35 30 45
04003680: 45 41 41 44 37 32 42 30 36 35 46 36 43 39 34 36 36 43 37 30 43 44 41 3
9 42 39 37 41 93 2c 80 00
040036a0: 01 02 ff ff
Flojo App version 39, WFW version 2c0200
Boot time 1456759024
Time now 1456759024
@jeromyevans
jeromyevans / tap-poweron.txt
Last active Nov 20, 2016
Fitbit ARIA Terminal After Tapping Power
View tap-poweron.txt
Built on Feb 29 2016 15:11:54
04003660: 20 f8 5e a
b 21 55 ff ff 39 35 30 45
04003680: 45 41 41 44 37 32 42 30 36 35 46 36 43 39 34 36 36 43 37 30 43 44 41 3
9 42 39 37 41 93 2c 80 00
040036a0: 01 02 ff ff
Flojo App version 39, WFW version 2c0200
Boot time 1456758918
Time now 1456758918
@jeromyevans
jeromyevans / gist:617e25ca90ed1d9e32e75872b6cd5d37
Last active Sep 10, 2017
Fitbit Aria Terminal Simple Power-on from battery
View gist:617e25ca90ed1d9e32e75872b6cd5d37
Built on Feb 29 2016 15:11:54
Config lost - RTC invalid - external reset/power failure
04003660: 20 f8 5e a
b 21 55 ff ff 39 35 30 45
04003680: 45 41 41 44 37 32 42 30 36 35 46 36 43 39 34 36 36 43 37 30 43 44 41 3
9 42 39 37 41 93 2c 80 00
040036a0: 01 02 ff ff
Flojo App version 39, WFW version 2c0200
Boot time 0
View gist:c730047c0ec03cc188ee
// Initiate the request to Xero to get an oAuth Request Token.
// With the token, we can send the user to Xero's authorize page
exports.requestXeroRequestToken = function(request, reply) {
oauth.getOAuthRequestToken(function(error, oauth_token, oauth_token_secret, results) {
if (error) {
console.log(error);
return reply.view('failed');
@jeromyevans
jeromyevans / gist:f30a6cb47e08bb2f778f
Created Jun 10, 2015
Use oauth to GET a Xero endpoint
View gist:f30a6cb47e08bb2f778f
oauth.get('https://api.xero.com/api.xro/2.0/Organisation',
oauth_access_token,
oauth_access_token_secret,
function (e, data, res) {
if (e) {
console.error(e);
return;
}
var oResponse = JSON.parse(data);
@jeromyevans
jeromyevans / gist:4ef8239cdc95f34426e7
Created Jun 10, 2015
Request the Xero Access Token
View gist:4ef8239cdc95f34426e7
// Perform the callback leg of the three-legged oAuth.
// Given the auth_token and auth_verifier from xero, request the AccessToken
exports.requestXeroAccessToken = function(request, reply) {
var oAuthToken = request.query["oauth_token"];
var oAuthVerifier = request.query["oauth_verifier"];
var org = request.query["org"];
var oAuthData = request.session.get('oauth');
@jeromyevans
jeromyevans / gist:a5fdcf6849ead322aeee
Created Jun 10, 2015
Configure oauth package to work with Xero API
View gist:a5fdcf6849ead322aeee
// Xero API defaults to application/xml content-type
var customHeaders = {
"Accept" : "application/json",
"Connection": "close"
};
var oauth = new OAuth.OAuth(
REQUEST_URL,
ACCESS_URL,
CONSUMER_KEY,
@jeromyevans
jeromyevans / gist:1d2b7e390a699b26da2d
Created Jun 10, 2015
Configure the endpoints for three-legged oauth with Xero
View gist:1d2b7e390a699b26da2d
// this is the user-accessed resource that initiates the authentication with xero.
// the user will eventually be redirected to Xero's authorize page
server.route({
method: 'GET',
path: '/authenticate',
handler: function(request, reply) {
XeroClient.requestXeroRequestToken(request, reply);
}
});