Skip to content

Instantly share code, notes, and snippets.

package main
import (
"embed"
"fmt"
"path/filepath"
)
var (
//go:embed templates
-- example dynamic request script which demonstrates changing
-- the request path and a header for each request
-------------------------------------------------------------
-- NOTE: each wrk thread has an independent Lua scripting
-- context and thus there will be one counter per thread
counter = 0
request = function()
path = "/api/stocks/" .. counter
wrk.method = "POST"
wrk.headers["Content-Type"] = "application/json"
counter = 0
request = function()
path = "/api/stocks"
wrk.body ='{"sku":"' .. tostring(counter) .. '","on_hand":198,"on_order":205,"expected_date":"2026-11-30T17:42:43.582365179-05:00","allocated":72,"warehouse_id":"778962","store_name":"Adobe Digital Government"}'
counter = counter + 1
return wrk.format(nil, path)
end
@nicksherron
nicksherron / couchbase_vs_mysql.ipynb
Last active August 27, 2021 06:42
couchbase_vs_mysql_vs_pg.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-resurrect \
thewtex/tmux-mem-cpu-load \
'
run '~/.tmux/plugins/tpm/tpm'
# https://github.com/gpakosz/.tmux
#
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
drop materialized view x_dates;
create materialized view x_dates as (
with a as (
select created, x_name, jsonb_array_elements_text((data #> '{dates}')) as d from streams
)
select * from (
select b.*, first_value(b.created) over(partition by b.sku, b.date order by b.created desc) as first_created from (
select
d::jsonb ->> 'sku' as sku,
--- from streams
crate materialized view x_orders as (
WITH a AS (
SELECT streams.created,
jsonb_array_elements_text(streams.data #> '{inventory}'::text[]) AS d
FROM streams
WHERE streams.x_name = 'hk:inv:x'::text
), aa AS (
SELECT streams.created,
jsonb_array_elements_text(streams.data #> '{inventory}'::text[]) AS d
call plug#begin('~/.config/nvim/bundle')
" launchd
Plug 'darfink/vim-plist'
" git tool
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rhubarb'
Plug 'lambdalisue/gina.vim'
# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# This file is licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License. A copy of the
# License is located at
#
# http://aws.amazon.com/apache2.0/
#
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
# OF ANY KIND, either express or implied. See the License for the specific

VIM KEYBOARD SHORTCUTS

MOVEMENT

h        -   Move left
j        -   Move down
k        -   Move up
l        -   Move right
$        -   Move to end of line
0        -   Move to beginning of line (including whitespace)