Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Paszkiewicz mikepaszkiewicz

View GitHub Profile
View drivetimes.html
<!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' />
@mikepaszkiewicz
mikepaszkiewicz / .sql
Last active May 6, 2020
PostgreSQL Cheat Sheet
View .sql
--CONNECTIONS
--check all active connections
SELECT * FROM pg_stat_activity;
--kill all other active connections
SELECT
pg_terminate_backend(pg_stat_activity.pid)
FROM
pg_stat_activity
@mikepaszkiewicz
mikepaszkiewicz / .sh
Last active Apr 9, 2020
Bash Cheat Sheet
View .sh
##FILESYSTEM
# append all .csv files in only one and ignore headers in subsequent files.
#!/bin/bash
OutFileName="X.csv" # Fix the output name
i=0 # Reset a counter
for filename in ./*.csv; do
if [ "$filename" != "$OutFileName" ] ; # Avoid recursion
then
if [[ $i -eq 0 ]] ; then
View geocoder_comparison.ts
import axios from 'axios'
interface GeocodeFeature {
"type": "Feature",
"geometry": {
"type": string,
"coordinates": number[]
},
"properties": {
@mikepaszkiewicz
mikepaszkiewicz / .sh
Created Oct 23, 2019
DevOps Cheat Sheet
View .sh
##HEROKU
#view running processes
heroku ps -a habitat-api-express
#kill running pid/stuck release
heroku ps:kill release.6104 -a habitat-api-express-staging
View gist:30c2aacbf6f583a3ddee0c8a54f3a98c
https://s3.amazonaws.com/downloads.metabase.com/v0.33.3/metabase-aws-eb.zip
@mikepaszkiewicz
mikepaszkiewicz / olo.md
Created Apr 9, 2018
Olo integration steps
View olo.md

Docs: https://dispatch-dsp.readme.io/docs Sandbox: https://vanilla.olosandbox.com/menu/dispatch-tryhabitat/

  • 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:

View gist:69d4556172c2d8aa2a3b5e90f677eb39
Docs: https://dispatch-dsp.readme.io/docs
Sandbox: https://vanilla.olosandbox.com/menu/dispatch-tryhabitat/
- _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:
- [x] Get quote by pickup time (https://dispatch-dsp.readme.io/v1.0/reference#request-quote)
- [x] Get quote by dropoff time (https://dispatch-dsp.readme.io/v1.0/reference#request-quote)
- [x] Make sure a delivery goes all the way through to completion
- [x] Ensure we get all required status updates (https://dispatch.dsp.readme.io/v1.0/reference#status-updates)
View example.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:1531fc6cec601c4faa5cda94fc6cc0af
{
"deliveryAreas": [
{
"features": [
{
"geometry": {
"coordinates": [
[
[
-73.685302734375,
You can’t perform that action at this time.