This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const compareVersions = (firstVersion, secondVersion) => { | |
let done = false | |
try { | |
const firstVersionArray = firstVersion.split('.') | |
const secondVersionArray = secondVersion.split('.') | |
let i = 0 | |
let length = firstVersionArray.length | |
do { | |
let first = parseFloat(firstVersionArray[i]) | |
let second = parseFloat(secondVersionArray[i]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Parse query params: | |
export default () => { | |
let finalParams | |
try { | |
const paramArray = window.location.search.replace('?', '').split('&') | |
const params = {} | |
paramArray.map((param, i) => { | |
if (param) { | |
const pair = param.split('=') | |
const key = pair[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function table ({ columns, items }) { | |
return ( | |
<table> | |
<thead> | |
<tr> | |
{columns.map(col => ( | |
<th>{col.key}</th> | |
))} | |
</tr> | |
</thead> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios'); | |
const util = require('util'); | |
const getEntity = async (page) => { | |
try { | |
let options = {}; | |
options.method = "GET"; | |
options.url = 'https://pokeapi.co/api/v2/pokemon'; | |
options.headers = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rp = require('request-promise'); | |
const util = require('util'); | |
const _ = require('underscore'); | |
const Promise = require('bluebird'); | |
var moment = require('moment'); | |
const authenticate = async (credentials) => { | |
try { | |
let options = {}; | |
options.method = "POST"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FOUND ISSUES [ | |
{ | |
"type": "missing_id_field", | |
"message": "schema type definitions must include a unique identifier field (fields.ID)", | |
"severity": "error", | |
"context": { | |
"dataType": "opportunitycompetitorscollection" | |
} | |
}, | |
{ |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> bedrockdata_fusion_microsoft_dynamics@1.0.0 start /Users/dally/Desktop/Left Hook/Bedrock/bedrock_fusion_microsoft_dynamics_2 | |
> node start.js | |
Dynamics server listening on 56009 | |
GET /v3/agents/microsoftdynamics42/auth?customer=000000000000000000000000 | |
Final setting for handleAuth: { token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6ImlCakwxUmNxemhpeTRmcHhJeGRacW9oTTJZayIsImtpZCI6ImlCakwxUmNxemhpeTRmcHhJeGRacW9oTTJZayJ9.eyJhdWQiOiJodHRwczovL2JlZHJvY2tkYXRhLmNybS5keW5hbWljcy5jb20iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC8yODIyNTYyNC03ODYwLTRmYzYtOWQ1ZS0zNmFlMjhlN2VjOTgvIiwiaWF0IjoxNTI4ODE4NjM5LCJuYmYiOjE1Mjg4MTg2MzksImV4cCI6MTUyODgyMjUzOSwiYWNyIjoiMSIsImFpbyI6IlkyZGdZUGdvSkZyaUZxUThMZlpwZm4vSWhZOUN2VGFSVndzbmJtVlFtYkh3UXZmcFI0b0EiLCJhbXIiOlsicHdkIl0sImFwcGlkIjoiNzI1ZTljZWYtNTlmZC00Y2Q5LThkMTMtZjM5Mzg0MzMwYjJiIiwiYXBwaWRhY3IiOiIxIiwiZV9leHAiOjI2MjgwMCwiZmFtaWx5X25hbWUiOiJNb3R0IiwiZ2l2ZW5fbmFtZSI6IkFkcmlhbiIsImlwYWRkciI6IjI0LjYxLjExMC45NiIsIm5hbWUiOiJBZHJpYW4gTW90dCIsIm9pZCI6ImU0M2UyMzg5LTA0ZTEtNGNhNC1hZWQ5L |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dallass-MacBook-Pro-8:ctscan dally$ ctscan test http://localhost:56009 microsoftdynamics34 | |
body-parser deprecated undefined extended: provide extended option src/fake_hyper.js:13:30 | |
Fake Hyper server listening on 4000 | |
RUNNING TESTS http://localhost:56009 microsoftdynamics34 | |
TESTING auth microsoftdynamics34 undefined | |
GET AGENT CALLED { agent: 'microsoftdynamics34' } { custId: '000000000000000000000000' } | |
GET LOCATOR CALLED { identity: '5b1e9eec7394fb1fb242a791' } { custId: '000000000000000000000000' } | |
QUERY IDENTITY LOCATOR { _id: 5b1e9eec7394fb1fb242a791 } | |
DECRYPT SECRETS CALLED { custId: '000000000000000000000000', | |
identityLocator: '{"_id":"5b1e9eec7394fb1fb242a791","resource":"5b1e9eec9d8cb16fd15832f8","createdAt":"2018-06-11T16:10:20.868Z","accessToken":"token"}' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var api_call_limit = response.headers['http_x_shopify_shop_api_call_limit']; | |
var current_limit = api_call_limit.split('/')[0]; | |
console.log("Current API Call Limit", current_limit); | |
var future_limit = api_call_limit.split('/')[1]; | |
console.log("Future API Call Limit", future_limit); | |
var results, items, cursor; | |
items = response.body.customers; | |
// when we reach the api limit, set timeout | |
if (future_limit > current_limit) { | |
console.log("No timeout needed"); |