Skip to content

Instantly share code, notes, and snippets.

View notjames's full-sized avatar
💭
¯\_(ツ)_/¯

Jim Conner notjames

💭
¯\_(ツ)_/¯
View GitHub Profile
@notjames
notjames / gist:0f0d5160b262ea75fd755f183811a400
Last active January 3, 2022 21:02
Helmfile complaints and frustrations...
I'm extremely frustrated.
I worked on our helmfile POC about eight months ago. I got working for a subset of charts we use; roughly six out of about
40 charts. That POC took me about two weeks to get done. In my opinion, that was too long for six charts but I was pleased
with the outcome at the time and I chalked up the time to having never worked with helmfile before.
After the successful POC, I moved on and put the project on the back burner until we could get more time to develop it
fully. So, now I'm circling back to this project. Trying to understand how I got helmfile to work for the POC is
unintuitive, complicated, and not at all DRY even though I used the recommended ways to DRY out our helmfile project at the
time with extensive help from the maintainer for which I was truly grateful and still am. However, it is my opinion that
@notjames
notjames / shell-set.sh
Created June 23, 2020 03:14 — forked from kigster/shell-set.sh
BASH functions to read values of set -e, -x, etc and be able to save them, and restore them later, eg. at the end of a function that wants to handle its errors.
#!/usr/bin/env bash
# ———————————————————————————————————————————————————————
# BashMatic Utilities Library
# ———————————————————————————————————————————————————————
# © 2017-2020 Konstantin Gredeskoul, All rights reserved.
#
# Distributed under the MIT LICENSE.
#
# Sources: https://github.com/kigster/bashmatic
# ———————————————————————————————————————————————————————
@notjames
notjames / endpoint.go
Last active May 17, 2020 16:36
golang: creating an instance requiring interface parameters...
package mypackage
import (
"net/http"
"github.com/gobuffalo/buffalo"
gateway "github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/api"
"google.golang.org/grpc/status"
@notjames
notjames / Keybase
Created February 25, 2020 22:31
Keybase
### Keybase proof
I hereby claim:
* I am notjames on github.
* I am cloaked1 (https://keybase.io/cloaked1) on keybase.
* I have a public key ASAy857Ke67AuD4yqtd9c59fqHEvV2NfXJbzTx0u-PJQaQo
To claim this, I am signing this object:
@notjames
notjames / garbage.cpp
Created June 19, 2018 23:40
how to create a pointer array of strings where each element points to another element in const array
#include <string>
using namespace std;
const string data[] = {
"A1,string1",
"A2,string2",
"A3,string3",
"A4,string4",
"A5,string5",
"A6,string6",
@notjames
notjames / kubescan.sh
Last active April 2, 2018 20:51 — forked from samba/kubescan.sh
Dump cluster state to YAML
#!/bin/bash
# USAGE
# kubescan.sh [kubeconfig.yaml] > state.yaml
# Goal:
# - Provide a quick way to dump the state of a cluster for analysis
# - Simplify verification of live state of the cluster
KUBECONFIG=${1:-$KUBECONFIG}
######################
### CONFIG CHANGES ###
######################
set -g mode-keys vi
#set -g default-terminal "screen-256color"
# set -g default-terminal "linux"
# remap prefix from 'C-b' to 'C-a'
unbind C-b
@notjames
notjames / exercise.tour.go
Last active July 9, 2017 07:35 — forked from zyxar/exercise.tour.go
tour.golang exercise solutions
/* Exercise: Loops and Functions #43 */
package main
import (
"fmt"
"math"
)
func Sqrt(x float64) float64 {
z := float64(2.)
@notjames
notjames / fullbeaker.md
Last active May 26, 2017 05:13 — forked from mark665/fullbeaker.md
Full Beaker "Homework"

1. The table below shows the formulas for triangular, pentagonal, and hexagonal numbers.

... ... ...
Triangular Tn = n(n+1)/2 1, 3, 6, 10, 15, ...
Pentagonal Pn = n(3n-1)/2 1, 5, 12, 22, 35, ...
Hexagonal Hn = n(2n-1) 1, 6, 15, 28, 45, ...

The number T285 = P165 = H143 = 40755 is a triangular number, a pentagonal number, and a hexagonal number. Write code to find the next number like this.