Skip to content

Instantly share code, notes, and snippets.

View jeremypruitt's full-sized avatar
:octocat:
@ Waabi.ai

Jeremy Pruitt jeremypruitt

:octocat:
@ Waabi.ai
View GitHub Profile

kQuery

A jQuery like library for manipulating kubernetes objects across various popular kubernetes platforms.

Problems that kQuery addresses:

  • Easy to use client library that is accessible to a wide range of developers (javascript/jQuery)
  • Consistent client library across inconsistent kubernetes implementations (abstracts the differences between EKS/AKS/GKE/Tectonic etc)
  • Simplify building long running custom controllers or operators on k8s

Examples

@stevenringo
stevenringo / reinvent-2017-youtube.md
Created December 3, 2017 23:01
Links to YouTube recordings of AWS re:Invent 2017 sessions

| Title | Description

@emilymye
emilymye / gce_demo_startup_script.sh
Last active November 20, 2017 20:52
Demos for Vault-GCP Auth Backend HUG/Webinar
# This assumes you have some role that can read some secret at secret/foo.
export VAULT_ADDR="http://my_vault_address.com"
export GCE_ROLE = "my-gce-role"
apt-get update
apt-get install -y jq
# Curl out to metadata server to get token
JWT=$(curl -H "Metadata-Flavor: Google" -G \
@domanchi
domanchi / cheatsheet.md
Last active March 25, 2025 17:02
[splunk cheatsheet] Splunk snippets, because their syntax is so confusing. #splunk

Splunk Queries

I really don't like Splunk documentation. Why is it so hard to find out how to do a certain action? So this is a cheatsheet that I constructed to help me quickly gain knowledge that I need.

Analysis

Events over time

index="my_log"
#!/usr/bin/env python3
'''
Since stash.ai became a paid-only service while still offering a super buggy product, I decided to switch to Raindrop.io
This shamelessly sloppy script might help you do the same.
Usage: ./stash-to-raindrop.py stash-export.json generated-file
'''
@rohitkothari
rohitkothari / ParameterizeHashicorpNomadJob.md
Created July 15, 2017 16:02
How to parameterize a Hashicorp's Nomad Job for user-defined variables?

How to parameterize a Hashicorp's Nomad Job for user-defined variables?

Description

This sample Nomad job attempts to clone a github repository from a github account, and then perform ls command to verify if it downloaded.

However, the cool thing is, it uses parameterized construct to parameterize the repository name so I can re-use this nomad job to clone any repository at runtime.

Motivation for writing

consul.*.runtime.*
name="consul_runtime"
type="$2"
host="{{ inventory_hostname }}"
consul.runtime.total_gc_pause_ns
name="consul_runtime_total_gc_pause_ns"
type="$2"
host="{{ inventory_hostname }}"
@jwhitcraft
jwhitcraft / annonomus.hcl
Created April 21, 2017 01:32
Below is my consul ACL policies for Consul 0.8.1 along with my consul config,
key "lock/" {
policy = "write"
}
service "" {
policy = "write"
}
node "" {
policy = "write"
}
session "" {
@AlbinoDrought
AlbinoDrought / make-client-key.sh
Created April 18, 2017 23:15
Vault SSH Secret Backend quick and dirty setup
#!/bin/bash
FILE="client_key"
OUTPUT_FILE="client_key-cert.pub"
echo "Generating new key..."
ssh-keygen -t rsa -f $FILE -N ''
echo "Getting client key signed by Vault..."
cat $FILE.pub | vault write ssh-client-signer/sign/clientrole public_key=- | grep "signed_key" | cut -f 2 > $OUTPUT_FILE
@ptrthomas
ptrthomas / hello-world.feature
Created April 2, 2017 06:15
Karate Hello World
Feature: karate 'hello world' example
Scenario: create and retrieve a cat
Given url 'http://myhost.com/v1/cats'
And request { name: 'Billie' }
When method post
Then status 201
And match response == { id: '#notnull', name: 'Billie' }
Given path response.id