Skip to content

Instantly share code, notes, and snippets.

@mikepaszkiewicz
mikepaszkiewicz / send.js
Created January 3, 2018 02:15
Raiblocks add send block to account
//NOTE: Connection = promisified wrapper around RPC calls...methods map directly to RPC 'action' parameter
import Rai from '../server/util/rai'
const Connection = Rai('http://000.000.000.000', 7076) //node IP and port
const SENDER_XRB_WALLET_ADDRESS = 'xrb_...'
const RECEIVING_WALLET = 'xrb_...'
const SENDER_PUBLIC_WALLET_KEY = '....'
async function sendBlock() {
try {
@mikepaszkiewicz
mikepaszkiewicz / gist:073440a413f71b37b1160db892ff9705
Created January 4, 2018 17:35
Snips: PostgreSQL - Create searchable text index on integer field
create index concurrently on transactions (order_number) USING GIN(order_number::text gin_trgm_ops)
{
"Ansi 2 Color" : {
"Green Component" : 0.73333334922790527,
"Red Component" : 0,
"Blue Component" : 0
},
"Tags" : [
],
"Ansi 12 Color" : {
@mikepaszkiewicz
mikepaszkiewicz / gist:13fcfb104ba6f52ec0c6e16b35b1c80a
Created January 24, 2018 21:44
get uniq runner ids that don't exist
with x as (select users.id, transactions.runner_id, transactions.runner_obj, transactions.created_at from transactions
left outer join users
on users.id = transactions.runner_id
where transactions.runner_id is not null
and users.id is null)
select distinct runner_id from x
{
"deliveryAreas": [
{
"features": [
{
"geometry": {
"coordinates": [
[
[
-73.685302734375,
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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)
@mikepaszkiewicz
mikepaszkiewicz / olo.md
Created April 9, 2018 15:23
Olo integration steps

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:

@mikepaszkiewicz
mikepaszkiewicz / gist:30c2aacbf6f583a3ddee0c8a54f3a98c
Created October 1, 2019 20:07
installing metabase via docker zip
https://s3.amazonaws.com/downloads.metabase.com/v0.33.3/metabase-aws-eb.zip
@mikepaszkiewicz
mikepaszkiewicz / .sql
Last active May 6, 2020 15:14
PostgreSQL Cheat Sheet
--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