Skip to content

Instantly share code, notes, and snippets.

View jacobweinstock's full-sized avatar

Jacob Weinstock jacobweinstock

  • Colorado, USA
  • 20:43 (UTC -07:00)
View GitHub Profile
@jacobweinstock
jacobweinstock / main.go
Created May 13, 2019 20:41
golang stream http response
package main
import (
"io"
"net/http"
"os/exec"
)
var (
BUF_LEN = 1024
@jacobweinstock
jacobweinstock / option2.sh
Last active June 9, 2020 20:48
another idea for serverless and cake
#!/usr/bin/env bash
echo -e "what's the full path to the cake spec.yaml file?"
read cakespec
echo -e "what's the full path to the cake-linux binary?"
read cakebinary
echo -e "run nuclio server"
docker run -d -p 8070:8070 -v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp --name nuclio-dashboard quay.io/nuclio/dashboard:stable-amd64
echo -e "download nuclio cli"
wget -O /usr/local/bin/nuctl https://github.com/nuclio/nuclio/releases/download/1.4.6/nuctl-1.4.6-$(go env GOHOSTOS)-$(go env GOHOSTARCH)
@jacobweinstock
jacobweinstock / serverless.sh
Last active June 9, 2020 18:25
serverless and cake deploy
#!/usr/bin/env bash
## FYI docker needs at least a few GBs of memory
if [ "$1" == "cleanup" ]; then
docker rm -f $(docker ps -a -q -f "name=nuclio-")
docker volume rm nuclio-local-storage
rm -rf cake.tar.gz nuclio_spec.yaml main.go
exit 0
fi
# Generated by Powerlevel10k configuration wizard on 2021-01-23 at 21:21 MST.
# Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 05135.
# Wizard options: powerline, classic, unicode, darkest, 12h time, angled separators,
# sharp heads, flat tails, 2 lines, disconnected, no frame, sparse, concise,
# instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate
# your own config based on it.
#
@jacobweinstock
jacobweinstock / Code Coverage - Tinklet
Last active November 2, 2021 02:47
Code Coverage - Tinklet
Code Coverage - Tinklet
#!ipxe
# RancherOS
# http://rancher.com/rancher-os/
:rancheros_menu
set os RancherOS
set url http://releases.rancher.com
menu ${os}
@jacobweinstock
jacobweinstock / devstats.sh
Created January 5, 2022 19:35
devstats for Tinkerbell
#!/bin/bash
# example execution for the last 8 months (range:2020-05-05,2022-01-04) of contributions to tinkerbell/boots:
# API_URL="https://devstats.cncf.io/api/v1" bash ./devstats.sh tinkerbell 'range:2020-05-05,2022-01-04' 'Contributions' 'tinkerbell/boots'
if [ -z "$1" ]
then
echo "$0: please specify project name as a 1st arg"
exit 2
fi
@jacobweinstock
jacobweinstock / test
Created June 13, 2022 23:09
test ipxe script
#!ipxe
set
autoboot
@jacobweinstock
jacobweinstock / infrastructure-components.yaml
Last active October 8, 2022 02:44
infrastructure-components.yaml
apiVersion: v1
kind: Namespace
metadata:
labels:
cluster.x-k8s.io/provider: infrastructure-tinkerbell
control-plane: controller-manager
name: capt-system
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
@jacobweinstock
jacobweinstock / state.txt
Created December 20, 2022 16:20
tink server state machine
server
┌────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ next │
│ ┌────────────────────────────────────────────────┐ │
│ │ │ │
│ ▼ │ │
│ ┌───────────┐ ┌──────────┐ ┌─────┴─────┐ ┌──────────┐ │
│ │ │ │ │ success │ │ end │ │ │
────────► │ pending ├───────────► │ running ├─┬───────► │ success ├─────────►│ complete │ │
│ │ │ received │ │ │ │ │ │ │ │