Skip to content

Instantly share code, notes, and snippets.

View mikedanese's full-sized avatar
🤔
trust me, i'm a ca.crt.

Mike Danese mikedanese

🤔
trust me, i'm a ca.crt.
View GitHub Profile
#! /bin/bash
set -o pipefail
set -o nounset
service::log() {
msg="$1"
timestamp=$(date +"[%m%d %H:%M:%S]")
printf "+++ %s: %s\n" "${timestamp}" "${msg}" > /dev/stderr
}
{
"kind": "Namespace",
"apiVersion": "v1",
"metadata": {
"name": "foo"
}
}
{
"kind": "Namespace",
"apiVersion": "v1",
typedef void (*function)();
char program[32];
int main() {
char *t = program;
unsigned i, n;
for (;;) {
for (i = 3; i; i--) {
n = getch() - '0';
if (n > 7) (*(function)program)();
*t = *t * 8 + n;
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.3.0 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_PERF_EVENTS_INTEL_UNCORE=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
cc_test(
name = "my_test",
srcs = ["my_test.cc"],
deps = ["//external:gtest/main"],
)
package main
import (
"flag"
"net"
"os"
"syscall"
"github.com/golang/glog"
)
@mikedanese
mikedanese / get_timeout.go
Created February 4, 2015 19:06
Get Timeout
package main
import (
"errors"
"net/http"
"net/http/httptest"
"testing"
"time"
)
@mikedanese
mikedanese / types.go
Last active August 29, 2015 14:14
Probe API
type Probe struct {
HTTPGet *HTTPGetAction `json:"httpGet,omitempty"`
TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty"`
Exec *ExecAction `json:"exec,omitempty"`
}
type LivenessProbe struct {
Probe `json:",inline"`
InitialDelaySeconds int64 `json:"initialDelaySeconds,omitempty"`
}
@mikedanese
mikedanese / main.go
Last active August 29, 2015 14:06
pctl
package main
import (
"bufio"
"fmt"
"io"
"io/ioutil"
"log"
"net"
"os"