Skip to content

Instantly share code, notes, and snippets.

View homme's full-sized avatar

Homme Zwaagstra homme

View GitHub Profile
@coco98
coco98 / kube-registry.yaml
Created May 2, 2017 16:31
Docker registry on minikube
apiVersion: v1
kind: ReplicationController
metadata:
name: kube-registry-v0
namespace: kube-system
labels:
k8s-app: kube-registry
version: v0
spec:
replicas: 1
@andelf
andelf / smtp_login_auth.go
Created March 8, 2013 18:40
golang net/smtp SMTP AUTH LOGIN Auth Handler
// MIT license (c) andelf 2013
import (
"net/smtp"
"errors"
)
type loginAuth struct {
username, password string
/*
In a child process, each of the stdio streams may be set to
one of the following:
1. A new file descriptor in the child, dup2'ed to the parent and
exposed to JS as a Stream object.
2. A copy of a file descriptor from the parent, with no other
added magical stuff.
3. A black hole - no pipe created.
/*
In a child process, each of the stdio streams may be set to
one of the following:
1. A new file descriptor in the child, dup2'ed to the parent and
exposed to JS as a Stream object.
2. A copy of a file descriptor from the parent, with no other
added magical stuff.
3. A black hole - no pipe created.
/*
# Use cases:
1. Efficiently ignore all data coming from a stdio stream (ie, >/dev/null)
2. Interact with stdio data in a JS Stream object
3. Inherit stdio streams from the parent process
4. Connect arbitrary handle to a stdio stream
5. Connect an arbitrary handle to a child stdio stream other than 0,1,2