Skip to content

Instantly share code, notes, and snippets.

View navicore's full-sized avatar

Ed Sweeney navicore

View GitHub Profile
Step 1) Apply CRDS
kubectl apply -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.6/deploy/manifests/00-crds.yaml
Step 2) Label namespace
kubectl create namespace cert-manager
kubectl label namespace cert-manager certmanager.k8s.io/disable-validation="true"
Step 3) Create Helm Chart
helm install --name cert-manager \
stable/cert-manager \
package main
import "fmt"
import "bytes"
import "encoding/gob"
import "encoding/hex"
import "github.com/AsynkronIT/protoactor-go/actor"
type MyActor struct {
CallCount int
@navicore
navicore / clone.c
Created January 28, 2018 22:07 — forked from jessfraz/clone.c
clone.c
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <sched.h>
#include <sys/wait.h>
#include <errno.h>
#define STACKSIZE (1024*1024)
static char child_stack[STACKSIZE];
@navicore
navicore / helm-rbac.md
Created December 18, 2017 03:56 — forked from mgoodness/helm-rbac.md
Helm RBAC setup for K8s v1.6+ (tested on minikube)
kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
@navicore
navicore / AkkaStreamSparkIntegration.scala
Created October 9, 2017 17:20 — forked from lloydmeta/AkkaStreamSparkIntegration.scala
Example for how to connect Akka Stream and Spark Streaming by turning creating a Flow element that feeds into an InputDstream
import akka.actor._
import akka.stream.scaladsl.Flow
import org.apache.spark.streaming.dstream.ReceiverInputDStream
import org.apache.spark.streaming.receiver.ActorHelper
import akka.actor.{ ExtensionKey, Extension, ExtendedActorSystem }
import scala.reflect.ClassTag
object AkkaStreamSparkIntegration {
@navicore
navicore / facts.lua
Created October 12, 2016 01:47 — forked from randrews/facts.lua
Make Lua look like Prolog!
----------------------------------------------------------------------------------------------------
--- Making Lua look like Prolog:
---
--- Let's use metatables for something other than emulating prototype-based OO. By making the
--- __index metamethod create values for undefined things, we can make Lua look like Prolog!
--- We create empty tables for anything starting with a capital letter, functions that populate
--- those tables for lowercase things (to assign relationships) and if a name begins with "is_"
--- then it becomes a function that queries those tables.
----------------------------------------------------------------------------------------------------
import org.apache.spark.storage.StorageLevel
import org.apache.spark.streaming.{ Seconds, StreamingContext }
import org.apache.spark.streaming.StreamingContext._
import org.apache.spark.streaming.twitter._
import org.sedis._
import redis.clients.jedis._
object TwitterWordCount {
def main(args: Array[String]) {
@navicore
navicore / 0_reuse_code.js
Created August 2, 2014 18:37
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console