Skip to content

Instantly share code, notes, and snippets.

Avatar

Frederick F. Kautz IV fkautz

View GitHub Profile
View x-factor-cnfs.md

The community is currently in the process of defining Cloud-Native Network Functions (CNFs). Due to the differences between the current modern architecture and cloud-native environment, many questions will arise about how to create, consume, operate, monitor and scale CNFs. As CNFs gain in popularity, it will become increasingly important to have a set of guidelines to help the community maximize the benefit received from running in the new Cloud-Native environment.

When cloud-native arrived, it was often unclear how web applications should be designed or rearchitected to make use of cloud-native infrastructure. Many mistakes were repeated due to a lack of guidance. In response, Adam Wiggins and others created a methodology known as 12 Factor Apps. 12 factor apps guide developers towards building applications capable of taking advantage of cloud-native infrastructure. These properties include but are not limited to:

  • Easier on-boarding for developers
  • Maximize portability
  • Deploy on modern cloud platfor
@fkautz
fkautz / gist:1b0f5c545d0995b5274f997da3fe72f6
Last active Aug 1, 2018
binding privileged container to netns of unprivileged container
View gist:1b0f5c545d0995b5274f997da3fe72f6
$ kubectl get pods
NAME                      READY     STATUS        RESTARTS   AGE
nginx-56f766d96f-lxkc9    1/1       Running       0          6m
$ docker ps | grep k8s_POD_nginx-56f766d96f-lxkc9
85b59aced967        k8s.gcr.io/pause-amd64:3.1   "/pause"                 7 minutes ago       Up 7 minutes                            k8s_POD_nginx-56f766d96f-lxkc9_default_426a6401-95b5-11e8-8a83-0800271b7911_0
View keybase.md

Keybase proof

I hereby claim:

  • I am fkautz on github.
  • I am fkautz (https://keybase.io/fkautz) on keybase.
  • I have a public key ASAVFqI73t8aycbbfmHjvA9YZN_Fnhkq9K3Bzd4E-UbrOgo

To claim this, I am signing this object:

@fkautz
fkautz / probcalc.go
Created Feb 10, 2015
Simple Probability Calculator
View probcalc.go
package main
import (
"fmt"
)
func main() {
fmt.Println("Prob 12 (P=0.02): ", findProb(0.02, 12))
fmt.Println("Prob 24 (P=0.02): ", findProb(0.02, 24))
fmt.Println()
View default-gist-reveal.it-slides.html
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'>
<h2>roadcasting Your</h3>
<h1>eveal.js</h1>
<h2>lideshow Presentations</h2>
<h1>LIVE</h1>
<p>on</p>
<img style="disply:block;border:none;background:none;box-shadow:none;width:50%;" alt='Docker-logo' src='https://gist.githubusercontent.com/ryanj/7ebf56442930b4c2188b/raw/6a6e03247efb03a0eee24a12f7beaf1ab4634563/Docker-whale.png'/>
<p class='fragment'><small><a href='http://dockercon-slides.com/'>dockercon-slides.com</a><br/>
<a href='http://github.com/ryanj/gist-reveal.it'>github.com/ryanj/gist-reveal.it</a></small></p>
</section>
@fkautz
fkautz / serverdemo.go
Created Jan 31, 2014
A simple demo of mixing various go http server and rpc using mux
View serverdemo.go
package main
import (
"bytes"
"fmt"
"github.com/gorilla/mux"
grpc "github.com/gorilla/rpc"
"github.com/gorilla/rpc/json"
"log"
"net/http"
View InlineVsChaining.scala
object Chaining {
val xs = List(1,2,3,4,5) //> xs : List[Int] = List(1, 2, 3, 4, 5)
def square(x:Int):Int = x*x //> square: (x: Int)Int
def even(x:Int):Boolean = x%2 == 0 //> even: (x: Int)Boolean
//// SHORT EXAMPLE
xs map square // <-- Prefer //> res0: List[Int] = List(1, 4, 9, 16, 25)
// vs
xs.map(square) //> res1: List[Int] = List(1, 4, 9, 16, 25)
@fkautz
fkautz / DynamicDispatchCalculator.scala
Last active Dec 18, 2015
Simple calculator using dynamic dispatch.
View DynamicDispatchCalculator.scala
package dynamic
abstract class Expression {
def eval:Double = ???
}
case class Value(val value: Double) extends Expression {
override def eval = value
}
@fkautz
fkautz / Calculator.scala
Last active Dec 18, 2015
Example of compiler discovering and warning missing cases in a simple calculator. sealed abstract class Expression is required for the warning message to appear. Sealed will require all direct subclasses (but not subclasses of subclasses) to be defined within the same file.
View Calculator.scala
sealed abstract class Expression
case class Add(val exp1:Expression, val exp2:Expression) extends Expression
case class Subtract(val exp1:Expression, val exp2:Expression) extends Expression
case class Multiply(val exp1:Expression, val exp2:Expression) extends Expression
case class Divide(val exp1:Expression, val exp2:Expression) extends Expression
case class Value(value:Double) extends Expression
object Calculator {
def calculate(expression:Expression):Double = {
You can’t perform that action at this time.