Skip to content

Instantly share code, notes, and snippets.

View ethanfrogers's full-sized avatar
💭
thinking about an interesting status message.

Ethan Rogers ethanfrogers

💭
thinking about an interesting status message.
View GitHub Profile

/* Imagine you have any number of servers (1 to 1000+) that generate log files for your distributed app. Each log file can range from 100MB - 512GB in size. They are copied to your machine which contains only 16GB of RAM.

The local directory would look like this: /temp/server-ac329xbv.log /temp/server-buyew12x.log /temp/server-cnw293z2.log

Our goal is to print the individual lines out to your screen, sorted by timestamp.

@ethanfrogers
ethanfrogers / multi_unmarshal.go
Created September 18, 2020 14:02
Unmarshal a list of JSON blobs into a list of structs
package main
import (
"encoding/json"
"fmt"
"log"
"reflect"
)
type MyAccount struct {
@ethanfrogers
ethanfrogers / main.sky
Created October 25, 2019 13:59
spinlark
load("//config/spinnaker/v1/spinnaker.sky", "spinnaker")
application_name = 'kustomize'
def slack_notification(when = []):
return spinnaker.notifications.slack(
channel = "#devops",
when = when,
)
@ethanfrogers
ethanfrogers / pipeline.json
Created August 12, 2019 13:30
Run Job with script from source control
{
"isNew": true,
"keepWaitingPipelines": false,
"lastModifiedBy": "anonymous",
"limitConcurrent": true,
"stages": [
{
"comments": "Replace <ORG>, <REPO>, and <PATH TO FILE> with relevant parameters.",
"isNew": true,
"method": "PUT",
@ethanfrogers
ethanfrogers / cm.yml
Created July 24, 2019 11:41
Potential CM
profiles:
clouddriver-local.yml:
foo:bar
serviceSettings:
clouddriver:
artifactId: my-new-image
orca:
kubernetes:
podAnnotations:
i/like: annotations
@ethanfrogers
ethanfrogers / job.yaml
Created May 7, 2019 12:36
Kaniko Job spec
apiVersion: batch/v1
kind: Job
metadata:
name: kaniko-builder
spec:
backoffLimit: 0
template:
spec:
restartPolicy: Never
<div>
<h1>Hello World</h1>
<stage-config-field label="Method" ng-if="$ctrl.displayField('method')">
<ui-select ng-model="$ctrl.stage.method" class="form-control input-sm">
<ui-select-match placeholder="Select a method...">{{$select.selected}}</ui-select-match>
<ui-select-choices repeat="method in $ctrl.methods | filter: $select.search">
<span ng-bind-html="method | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
</stage-config-field>

News from Armory

Terraform Stage

Armory is working on a Terraform stage

@ethanfrogers
ethanfrogers / deployment.yml
Last active November 1, 2018 14:54
Halyard Deployment for air-gapped environments
apiVersion: apps/v1
kind: Deployment
metadata:
name: armory-halyard
namespace: {some-namespace}
labels:
app: armory-halyard
spec:
replicas: 1
selector:
@ethanfrogers
ethanfrogers / services.yml
Created September 4, 2018 15:14
Spinnaker Kubernetes Service YAML - Public
apiVersion: v1
kind: Service
metadata:
labels:
app: spin
cluster: spin-gate
name: spin-gate-public
spec:
ports:
- port: 8084