Generate a couple key pairs:
openssl req -x509 -newkey rsa:2048 -keyout key1.pem -out cert1.pem -days 42 -nodes
openssl req -x509 -newkey rsa:2048 -keyout key2.pem -out cert2.pem -days 42 -nodes
ln -s key1.pem key.pem
ln -s cert1.pem cert.pem
Flag --etcd-quorum-read has been deprecated, This flag is deprecated and the ability to switch off quorum read will be removed in a future release. | |
Flag --insecure-bind-address has been deprecated, This flag will be removed in a future version. | |
Flag --insecure-port has been deprecated, This flag will be removed in a future version. | |
I0712 22:54:43.196267 1 flags.go:27] FLAG: --address="127.0.0.1" | |
I0712 22:54:43.196388 1 flags.go:27] FLAG: --admission-control="[]" | |
I0712 22:54:43.196435 1 flags.go:27] FLAG: --admission-control-config-file="" | |
I0712 22:54:43.196476 1 flags.go:27] FLAG: --advertise-address="<nil>" | |
I0712 22:54:43.196541 1 flags.go:27] FLAG: --allow-privileged="true" | |
I0712 22:54:43.196582 1 flags.go:27] FLAG: --alsologtostderr="false" | |
I0712 22:54:43.196622 1 flags.go:27] FLAG: --anonymous-auth="false" |
#!/usr/bin/python | |
import socket | |
import struct | |
from protobuf import IpcConnectionContext_pb2 as IpcConnectionContext | |
from protobuf import RpcPayloadHeader_pb2 as RpcPayloadHeader | |
# --- Connection header --- | |
# Client.writeConnectionHeader() | |
preamble = ( |
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
type Foo struct { | |
t *time.Ticker | |
} |
package gist | |
import "unsafe" | |
//go:noescape | |
//go:linkname strhash runtime.strhash | |
func strhash(a unsafe.Pointer, h uintptr) uintptr | |
// StrHash returns the hash of the given string. | |
func StrHash(s string) uintptr { |
#!/usr/bin/python | |
# A simple example of a threaded TCP server in Python. | |
# | |
# Copyright (c) 2012 Benoit Sigoure All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# - Redistributions of source code must retain the above copyright notice, | |
# this list of conditions and the following disclaimer. | |
# - Redistributions in binary form must reproduce the above copyright notice, |
#!/bin/bash | |
# Copyright (c) 2010, 2011 Benoit Sigoure. All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# - Redistributions of source code must retain the above copyright notice, | |
# this list of conditions and the following disclaimer. | |
# - Redistributions in binary form must reproduce the above copyright notice, | |
# this list of conditions and the following disclaimer in the documentation | |
# and/or other materials provided with the distribution. |
// Copyright (C) 2012 Benoit Sigoure | |
// Copyright (C) 2012 StumbleUpon, Inc. | |
// This library is free software: you can redistribute it and/or modify it | |
// under the terms of the GNU Lesser General Public License as published by | |
// the Free Software Foundation, either version 2.1 of the License, or (at your | |
// option) any later version. This program is distributed in the hope that it | |
// will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty | |
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser | |
// General Public License for more details. You should have received a copy | |
// of the GNU Lesser General Public License along with this program. If not, |
#include <iostream> | |
template <int i> | |
struct factorial { | |
enum { | |
result = factorial<i-1>::result * i, | |
}; | |
}; | |
template <> |
// This code is untested, may not even compile, but illustrates the idea. | |
class ComplexAsyncScanLoopDemo { | |
public Deferred<Object> scanAndProcess(final String start, final String stop) { | |
// This is the Deferred that the caller will wait on until everything | |
// we're doing has completed. If there was an object we wanted to return | |
// asynchronously to them as a result of whatever we're doing, we'd hand | |
// it to this Deferred once we're done. | |
final Deferred<Object> result = new Deferred<Object>(); |