This file contains hidden or 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
SELECT | |
u.*, | |
row_to_json(d.*) device | |
FROM | |
users u | |
INNER JOIN ( | |
SELECT | |
user_id, | |
MAX(created_at) MaxDate | |
FROM |
This file contains hidden or 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 zuppler = 'c6b348e0-6d49-11ea-9d4d-db9d78913103' | |
const vendor = '05a3b881-ee42-11eb-a309-21dcd8197474' | |
const time = moment() | |
.add({ hours: 2 }) | |
.startOf('hour') | |
.toISOString() | |
//quote payload | |
const q = { | |
bag_count: 1, |
This file contains hidden or 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
//note ready_at in /quotes and ready_by in /orders are the same value | |
POST /quotes | |
{ | |
origin: | |
'2000 Market Street, 2000 Market St, Philadelphia, PA 19103, USA', | |
destination: | |
'1999 North 52nd Street, , Philadelphia, PA, 19131, United States', | |
vendor_id, |
This file contains hidden or 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
#!/bin/bash | |
# Scans /tests directory for instances of 'it.only', | |
# If found, cancel commit and log files that need to be fixed. | |
TEST_ERRORS=$(grep -s it.only ../tests/*/** | wc -l) | |
echo "Verifying all tests are enabled..."; | |
if [ $TEST_ERRORS -gt 0 ] | |
then |
This file contains hidden or 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
import { Knex } from 'knex' | |
import { Territory } from '../packages/types' | |
exports.up = async function (knex: Knex) { | |
await knex.schema.hasTable('operators').then(async hasTable => { | |
if (hasTable) { | |
await knex.schema | |
.hasColumn('operators', 'send_tracker_link') | |
.then(async hasColumn => { | |
if (!hasColumn) { | |
await knex.schema.table('operators', t => { |
This file contains hidden or 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 deriveRunnerLaborHours(pred: CapacityPreds, max_callout_rate: number) { | |
if (pred.runner_hours_predicted === 0) { | |
return { finalCapacity: 0 } | |
} | |
let predictedDrhWithLimits: number = null | |
if (pred.drh_predicted < MIN_DRH) { | |
predictedDrhWithLimits = MIN_DRH | |
} else if (pred.drh_predicted > MAX_DRH) { |
This file contains hidden or 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
Applying hasura data to: | |
https://worthy-leech-90.hasura.app/v1/graphql | |
{"level":"info","msg":"Help us improve Hasura! The cli collects anonymized usage stats which\nallow us to keep improving Hasura at warp speed. To opt-out or read more,\nvisit https://hasura.io/docs/1.0/graphql/manual/guides/telemetry.html\n","time":"2021-01-13T22:34:07Z"} | |
{"level":"debug","msg":"global config file exisits, verifying contents","time":"2021-01-13T22:34:07Z"} | |
{"level":"debug","msg":"global config is pre-set to \u0026cli.GlobalConfig{UUID:\"ebb072c2-9126-4302-af5c-c1598c9ad5f9\", EnableTelemetry:true, ShowUpdateNotification:true, CLIEnvironment:\"default\"}","time":"2021-01-13T22:34:07Z"} | |
{"level":"debug","msg":"global config: uuid: ebb072c2-9126-4302-af5c-c1598c9ad5f9","time":"2021-01-13T22:34:07Z"} | |
{"level":"debug","msg":"global config: enableTelemetry: true","time":"2021-01-13T22:34:07Z"} | |
{"level":"debug","msg":"global config: showUpdateNotification: true","time":"2021 |
This file contains hidden or 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
#!/bin/bash | |
apt-get -y update | |
cat > /tmp/subscript.sh << EOF | |
# START UBUNTU USERSPACE | |
echo "Setting up NodeJS Environment" | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.9/install.sh | bash | |
echo 'export NVM_DIR="/home/ubuntu/.nvm"' >> /home/ubuntu/.bashrc | |
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> /home/ubuntu/.bashrc | |
# Dot source the files to ensure that variables are available within the current shell | |
. /home/ubuntu/.nvm/nvm.sh |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8' /> | |
<title>Get started with the Isochrone API</title> | |
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
<!-- Import Mapbox GL JS --> | |
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.6.1/mapbox-gl.js'></script> | |
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.6.1/mapbox-gl.css' rel='stylesheet' /> |
This file contains hidden or 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
import axios from 'axios' | |
interface GeocodeFeature { | |
"type": "Feature", | |
"geometry": { | |
"type": string, | |
"coordinates": number[] | |
}, | |
"properties": { |
NewerOlder