Skip to content

Instantly share code, notes, and snippets.

🏠
Working on Covid-19 Exposure Notifications

Mike Helmick mikehelmick

🏠
Working on Covid-19 Exposure Notifications
Block or report user

Report or block mikehelmick

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mikehelmick
mikehelmick / discovery.yaml
Created Feb 13, 2020
CloudDiscovery Example - 12 Feb 2020
View discovery.yaml
openapi: 3.0.0
servers:
- description: CloudEvents Discovery API
url: https://virtserver.swaggerhub.com/mikehelmick/discovery/1.0.0
info:
description: CloudEvents Cloud Discovery API
version: "1.0.0"
title: Cloud Discovery API
paths:
/:
@mikehelmick
mikehelmick / source_results.yaml
Created Jan 16, 2020
% kubectl get CustomResourceDefinitions -l "duck.knative.dev/source" -oyaml
View source_results.yaml
apiVersion: v1
items:
- apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"apiextensions.k8s.io/v1beta1","kind":"CustomResourceDefinition","metadata":{"annotations":{"registry.knative.dev/eventTypes":"[\n { \"type\": \"dev.knative.apiserver.resource.add\" },\n { \"type\": \"dev.knative.apiserver.resource.delete\" },\n { \"type\": \"dev.knative.apiserver.resource.update\" },\n { \"type\": \"dev.knative.apiserver.ref.add\" },\n { \"type\": \"dev.knative.apiserver.ref.delete\" },\n { \"type\": \"dev.knative.apiserver.ref.update\" }\n]\n"},"creationTimestamp":null,"labels":{"duck.knative.dev/source":"true","eventing.knative.dev/release":"devel","eventing.knative.dev/source":"true","knative.dev/crd-install":"true"},"name":"apiserversources.sources.eventing.knative.dev"},"spec":{"additionalPrinterColumns":[{"JSONPath":".status.conditions[?(@.type==\"Ready\")].status","name":"Rea
@mikehelmick
mikehelmick / LookAtMemberVariables.cpp
Last active Aug 29, 2015
In our series of how C++ doesn't actually offer you any protection in the language, we show how you can directly access private member variables. Don't try this at home. Ok - do try this at home, and then don't do it at work.
View LookAtMemberVariables.cpp
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
class Point {
public:
void setX(int newX) {
@mikehelmick
mikehelmick / constarray.cpp
Created Feb 13, 2014
Modifying the contents of a const array
View constarray.cpp
#include <iostream>
using namespace std;
void printArray(int a[], int size) {
for (int i = 0; i < size; i++) {
cout << a[i] << " ";
}
cout << endl;
}
@mikehelmick
mikehelmick / Bad.cpp
Created Feb 12, 2014
Another reason I dislike C++ for teaching introductory programming.... this works
View Bad.cpp
#include <iostream>
#include <cstdlib>
class BadActor {
public:
BadActor() {
this->value = 5;
}
int getValue() const {
View bowling.erl
% Bowling scoring calculation in Erlang as a rescursive function
-module(bowling).
-export([score/1]).
% To run - start an erlang shell, erl
%
% c(bowling).
% bowling:score([x, 5, 4, 2, s, x, 0, s, 0, 5, x, 5, s, 6, 2, x, 0, 1]).
You can’t perform that action at this time.