Skip to content

Instantly share code, notes, and snippets.


Paul Okstad pokstad

View GitHub Profile
pokstad / anything_test.go
Created Apr 10, 2017
A Go test that demonstrates how to marshal and unmarshal a Protobuf any.Any type
View anything_test.go
package anything_test
//go:generate protoc --go_out=. anything.proto
import (
proto ""
pokstad / anything.proto
Created Apr 10, 2017
A protobuf defintion to demonstrate any.Any
View anything.proto
syntax = "proto3";
package anything;
import "google/protobuf/any.proto";
message AnythingForYou {
google.protobuf.Any anything = 1;
pokstad / anything.pb.go
Last active Apr 10, 2017
Protobuf and generate Go code for protobuf definition demonstrating any.Any usage
View anything.pb.go
// Code generated by protoc-gen-go.
// source: anything.proto
Package anything is a generated protocol buffer package.
It is generated from these files:
pokstad / app.yaml
Last active Aug 29, 2015
Google App Engine Sandbox Module for Dispatch Demo
View app.yaml
# make sure to replace "projectid" below with the project ID configured in the Google Developer Console
application: projectid
version: 1
runtime: go
api_version: go1
module: module2
- url: /.*
script: _go_app
pokstad / Dockerfile
Last active Aug 29, 2015
Sample App for Google's Managed VM service
View Dockerfile
# Dockerfile extending the generic Go image with application files for a
# single application.
COPY . /go/src/app
RUN go-wrapper download
RUN go-wrapper install -tags appenginevm
pokstad / gaereverseproxy.go
Last active Dec 30, 2019
Google App Engine reverse proxy in Golang
View gaereverseproxy.go
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// HTTP reverse proxy handler
package goengine
import (
# --- Version history ---
# 0.4: added variable to store file path, and $2 for base file name
# added variable to store desired reporting interval
# 0.3: added $1 to send in process ID at run time.
# 0.2: switched to $SECONDS for the loop. works.
# 0.1: didn't work well at all.
# --- Version history ---
# Usage: cputrack [PID] [filename]
pokstad / couchdbreverseproxy.go
Last active Aug 29, 2015
CouchDB Reverse Proxy in Go
View couchdbreverseproxy.go
package main
import (
pokstad /
Last active Aug 29, 2015
CouchDB OS Daemon Demo
This script demonstrates how a CouchDB OS Daemon can be written in Python.
For more information on CouchDB OS Daemons, please read here:
import json
import sys
pokstad / gist:9882305
Created Mar 31, 2014
Install CouchDB 1.5 on Ubuntu 12.04 LTS 64-bit Server
View gist:9882305
# satisfy dependencies
sudo apt-get -y update
sudo apt-get -y install curl
sudo apt-get -y build-dep couchdb
sudo apt-get -y install libmozjs185-dev libicu-dev libcurl4-gnutls-dev libtool erlang-eunit erlang-os-mon erlang-nox g++
# get source code, build, and install
tar -zxvf apache-couchdb-1.5.0.tar.gz
cd apache-couchdb-1.5.0