Skip to content

Instantly share code, notes, and snippets.

View clipped-drh-callout.ts
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) {
View heroku-fail.log
Applying hasura data to:
{"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\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
mikepaszkiewicz /
Created Dec 11, 2020 — forked from abhilash1in/
Install nvm and NodeJS using AWS EC2 user data script
apt-get -y update
cat > /tmp/ << EOF
echo "Setting up NodeJS Environment"
curl -o- | bash
echo 'export NVM_DIR="/home/ubuntu/.nvm"' >> /home/ubuntu/.bashrc
echo '[ -s "$NVM_DIR/" ] && . "$NVM_DIR/" # This loads nvm' >> /home/ubuntu/.bashrc
# Dot source the files to ensure that variables are available within the current shell
. /home/ubuntu/.nvm/
View drivetimes.html
<!DOCTYPE html>
<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=''></script>
<link href='' rel='stylesheet' />
View geocoder_comparison.ts
import axios from 'axios'
interface GeocodeFeature {
"type": "Feature",
"geometry": {
"type": string,
"coordinates": number[]
"properties": {
mikepaszkiewicz / .sh
Created Oct 23, 2019
DevOps Cheat Sheet
View .sh
#view running processes
heroku ps -a habitat-api-express
#kill running pid/stuck release
heroku ps:kill release.6104 -a habitat-api-express-staging
mikepaszkiewicz / .sh
Last active Oct 8, 2020
Bash Cheat Sheet
View .sh
# append all .csv files in only one and ignore headers in subsequent files.
OutFileName="X.csv" # Fix the output name
i=0 # Reset a counter
for filename in ./*.csv; do
if [ "$filename" != "$OutFileName" ] ; # Avoid recursion
if [[ $i -eq 0 ]] ; then
mikepaszkiewicz / .sql
Last active May 6, 2020
PostgreSQL Cheat Sheet
View .sql
--check all active connections
SELECT * FROM pg_stat_activity;
--kill all other active connections
View gist:30c2aacbf6f583a3ddee0c8a54f3a98c
mikepaszkiewicz /
Created Apr 9, 2018
Olo integration steps

Docs: Sandbox:

  • Make sure 26 Broadway New York, NY 10004 is in your coverage area to be able to accept orders.

OLO will test the following before turning on integration: