Skip to content

Instantly share code, notes, and snippets.

View jonmorehouse's full-sized avatar
💻
founder at nuon.co

Jon Morehouse jonmorehouse

💻
founder at nuon.co
View GitHub Profile
---
key_stroke_delay: 50ms
command_delay: 200ms
terminal: ~/nuon $
env_vars:
WHATEVER: VALUE-TEST
steps:
- name: "install nuon"
display_cmd: /bin/bash -c "$(curl -fsSL https://nuon-artifacts.s3.us-west-2.amazonaws.com/cli/install.sh)"
package main
import "fmt"
func SliceToGroupsUpdated[T any](slice []T, limit int) [][]T {
if limit < 1 {
limit = 1
}
matrix := [][]T{{}}
project = "13kd9sg15ereb28247anowbbek"
#
# thoughts:
# build config - public image, dockerfile or buildpack
# deploy config - select a "preset", use a private helm chart, use a public helm chart
# listener config - derived from the preset config (ie: has a probe path, listener port, domain stuff in the future)
#
#
# https://developer.hashicorp.com/waypoint/plugins/kubernetes
project = "abc"
app "mario" {
build {
use "docker-pull" {
image = "pengbai/docker-supermario"
tag = "latest"
disable_entrypoint = true
}
}
package cmd
import (
"context"
"fmt"
"log"
"github.com/hashicorp/waypoint/pkg/server/gen"
"github.com/powertoolsdev/go-common/config"
"github.com/powertoolsdev/go-common/shortid"
~programs/kara-patient-derived-views-ui (master*)$ ds view debug --prefix=cli-events debug_op=resource-state
starting datastore-cli...
viewing 3afa28c7-cefc-4198-851c-8b861c0c4529
created 3 minutes ago
{
"component-idx": 0,
"created_at": 1609891937,
"debug_id": "c098e50b-a5b3-49b8-b3f9-4dbf224021c2",
"debug_op": "resource-state",
"debug_state": {
uri = '/httpbin/headers'
# we want to strip the `/httpbin` off the front
new_uri = uri.lstrip('/httpbin')
# this returns 'eaders' because it treats the input into lstrip as a set of characters to strip. So it strips all of
# those characters until it finds something that is not in one of those (e)
# now, let's try with something more predictable
uri = '/httpbin/status'
# this returns status, as expected!
@jonmorehouse
jonmorehouse / doctor-example.json
Created September 24, 2019 20:56
doctor-example from better doctor api
{
"meta": {
"data_type": "Doctor",
"total": 1,
"count": 1
},
"data": {
"practices": [
{
"location_slug": "ca-san-bernardino",
CC = g++
CFLAGS = -g -Wall -Wvla -Wshadow -Wunreachable-code -Wconversion -Wno-sign-conversion -Wno-sign-compare -Wno-write-strings -fdiagnostics-color=always
all:
$(CC) $(CFLAGS) filesys.cpp mlist.cpp os.cpp -o filesys
clean:
rm -f *.o filesys
#include <iostream>
#include <sstream>
#include <stdlib.h>
#include <string.h>
#include <vector>
#include "os.h"
using namespace std;
//function prototypes