A comprehensive collection of all commands and patterns from the "JSON Flip" technique for JSON-to-CSV conversion.
# Basic pattern for converting JSON arrays to CSV
jq -r '(.[0] | keys_unsorted) as $keys |
# assumes miniconda is installed on user home | |
# direnv can be installed using brew install direnv or other OS specific methods | |
use_conda(){ | |
local conda_setup="$("$HOME/miniconda3/bin/conda" 'shell.zsh' 'hook' 2> /dev/null)" | |
eval "$conda_setup" | |
conda activate <name of your conda environment to load> | |
} | |
strict_env | |
use conda |
# https://taskfile.dev | |
version: "3" | |
tasks: | |
default: | |
desc: The default task that will be run when task is called without explicit task name | |
aliases: | |
- all | |
cmds: | |
- task: install_packages |
#syntax=docker/dockerfile:1.3-labs | |
FROM --platform=$TARGETPLATFORM rust:1.67-alpine3.17 AS bins | |
ARG TARGETPLATFORM | |
RUN --mount=type=cache,target=/usr/local/cargo/registry \ | |
apk add -U --no-cache alpine-sdk gcompat go-task \ | |
&& cargo install cargo-zigbuild |
admin: | |
access_log_path: /tmp/admin_access.log | |
address: | |
socket_address: { address: 0.0.0.0, port_value: 9901 } | |
static_resources: | |
listeners: | |
- name: listener_0 | |
address: | |
socket_address: { address: 0.0.0.0, port_value: 10000 } |
# Instructions for fresh install | |
$ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon | |
# reboot | |
$ source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh | |
$ echo 'export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH' | tee -a ~/.zshrc | |
$ echo 'source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh' | tee -a ~/.zshrc | |
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable | |
$ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin | |
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager |
apiVersion: gateway.solo.io/v1 | |
kind: VirtualService | |
metadata: | |
name: fruits-api | |
namespace: my-gloo | |
spec: | |
displayName: FruitsAPI | |
virtualHost: | |
options: | |
cors: |
msg: "[protoc -I/Users/kameshs/git/solo-io/gloo/vendor_any -I/Users/kameshs/git/solo-io/gloo/vendor_any/github.com/solo-io/protoc-gen-ext -I/Users/kameshs/git/solo-io/gloo/vendor_any/github.com/solo-io/protoc-gen-ext/external -I/Users/kameshs/git/solo-io/gloo/vendor_any/github.com/envoyproxy/protoc-gen-validate -I/Users/kameshs/git/solo-io/gloo/vendor_any/github.com/solo-io/gloo/projects/gloo/api/external -I/Users/kameshs/git/solo-io/gloo/vendor_any/github.com/solo-io/solo-kit/api/external --openapi_out=yaml=true,single_file=false,max_description_characters=0,include_description=false:/var/folders/42/cf1r2rm562b3ss1cf_dt38rc0000gn/T/405539825/external_options -o /var/folders/42/cf1r2rm562b3ss1cf_dt38rc0000gn/T/schema-gen-979669148 --include_imports --include_source_info github.com/solo-io/gloo/projects/gateway/api/v1/external_options.proto] failed: github.com/solo-io/gloo/projects/gateway/api/v1/external_options.proto:9:1: warning: Import google/protobuf/wrappers.proto is unused.\ngithub.com/solo-io/gloo/proj |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/focal64" | |
config.vm.provider "virtualbox" do |vb| | |
vb.gui = false | |
vb.memory = "512" |
#!/usr/bin/env bash | |
set -eu | |
PROFILE_NAME=${PROFILE_NAME:-bgcdemo} | |
MEMORY=${MEMORY:-8192} | |
CPUS=${CPUS:-4} | |
# Enable if you are going to use Tekton with Knative | |
EXTRA_CONFIG="apiserver.enable-admission-plugins=\ |