Skip to content

Instantly share code, notes, and snippets.

View johannespetzold's full-sized avatar

Johannes Petzold johannespetzold

View GitHub Profile
#include "Keyboard.h"
// columns are outputs, rows are inputs
uint8_t colPins[] = { 15, 14, 16, 10, 3, 4 };
uint8_t rowPins[] = { 5, 6, 7, 8, 9 };
#define NUMCOLS sizeof(colPins)
#define NUMROWS sizeof(rowPins)
#define NUMKEYS (NUMCOLS * NUMROWS)
@johannespetzold
johannespetzold / main.go
Created April 27, 2018 18:35
multi dimensional list
package main
import (
"fmt"
)
func main() {
l := &l{}
fmt.Printf("result=%v\n", sum(l, nil, l.dims()))
}
@johannespetzold
johannespetzold / main.go
Created August 21, 2017 23:21
sse test client
package main
import (
"github.com/donovanhide/eventsource"
"fmt"
"log"
)
func main() {
// prod
package main
import (
"log"
"net/http"
"os"
"github.com/cloudfoundry-incubator/receptor/cmd/receptor/testrunner"
"github.com/cloudfoundry/storeadapter/storerunner/etcdstorerunner"
"github.com/onsi/ginkgo"
FROM boot2docker/boot2docker
RUN apt-get -y install p7zip-full
ENV VBOX_VERSION 4.3.12
# Build VBox guest additions
RUN mkdir -p /vboxguest && \
cd /vboxguest && \
curl -L -o vboxguest.iso http://download.virtualbox.org/virtualbox/${VBOX_VERSION}/VBoxGuestAdditions_${VBOX_VERSION}.iso && \