Skip to content

Instantly share code, notes, and snippets.

@vtatai
vtatai / cps-sink-connector.properties
Created April 24, 2020 21:17
Kafka GCP Pub/Sub Connector config
name=CPSSinkConnector
connector.class=com.google.pubsub.kafka.sink.CloudPubSubSinkConnector
tasks.max=10
topics=hello_world
cps.topic=hello_world
cps.project=<GCP PROJECT NAME>
value.converter=org.apache.kafka.connect.storage.StringConverter
key.converter.schemas.enable=false
value.converter.schemas.enable=false
@vtatai
vtatai / helloWorld.go
Created April 24, 2020 20:27
Sample golang lambda pub/sub consumer
// Package helloworld provides a set of Cloud Functions samples.
package helloworld
import (
"context"
"log"
)
// PubSubMessage is the payload of a Pub/Sub event.
type PubSubMessage struct {
data User = User {
name :: String,
child :: Maybe User
} deriving Show
john = User {name="John", child=Just User{name="Christie", child=Nothing}}
complexUsers = Map.fromList[(1, john)]
lookupComplexUser id = Map.lookup id complexUsers
add = (+)
add1 = add 1
@vtatai
vtatai / gist:875457
Created March 18, 2011 01:08
User attaches picture to household
Feature: User attaches picture to household
In order to show pictures for households,
As any user
I want to be able to upload a picture of the entire household to the household page
Scenario: User attaches picture to household
Given I am a new, authenticated user
And a household called "Hun"
When I go to the page for household "Hun"
And I press "Edit"
Player p = new Player()
.init()
.play(new File(fileName), testCase, className, params);
p.printErrors();
<repositories>
<repository>
<id>sonatype-oss</id>
<url>http://oss.sonatype.org/content/repositories/releases/</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>sonatype-oss-snapshots</id>