Skip to content

Instantly share code, notes, and snippets.

View meson10's full-sized avatar

Piyush Verma meson10

View GitHub Profile
@meson10
meson10 / instance.tf.json
Last active June 17, 2016 08:02
Instance sample includes ssh_key_thumbnail
{
"variable": {
"base_image": {
"default": "Ubuntu Server 14.04 LTS"
},
"ssh_username": {
"default": "terraform"
},
"instance_type": {
"default": "Basic_A2"
@meson10
meson10 / service.tf.json
Created June 17, 2016 07:37
Terraform Service
{
"resource": {
"azure_hosted_service": {
"terraform": {
"name": "domain-gamma",
"location": "${module.azure.region}",
"ephemeral_contents": false,
"description": "Hosted service created by Terraform.",
"label": "dm-gm-01"
}
@meson10
meson10 / int64.go
Created May 23, 2016 07:18
Go behaves weirdly with int64 being marshalled out of interfaces
package main
import (
"fmt"
"encoding/json"
)
type Data map[string]interface{}
func main() {
@meson10
meson10 / quick.go
Created May 14, 2016 14:08
quick_testing.go
package main
import (
"log"
"math"
"testing"
"testing/quick"
)
func myMin(a, b float64) float64 {
@meson10
meson10 / ssh_config
Last active March 25, 2016 07:12
SSH config
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
UsePrivilegeSeparation no
KeyRegenerationInterval 3600
ServerKeyBits 1024
SyslogFacility AUTH
@meson10
meson10 / gilmour-sample.rb
Created March 16, 2016 03:19
Sample gilmour implementation in Ruby
dc_pipeline = responder.compose([
{ topic: 'private.customer.datacenter.create', message: data },
{ topic: 'private.validate' }
])
nodes_pipeline = responder.compose([
responder.parallel([
{ topic: 'private.customer.logger.create', message: data,
opts: { timeout: 900} },
]),
@meson10
meson10 / gilmour-sample.go
Created March 16, 2016 03:18
Sample gilmour implementation in Go
batch := engine.NewPipe(
engine.NewRequest("weather.fetch"),
engine.NewRequest("weather.group"),
engine.NewParallel(
engine.NewPipe(
engine.NewLambda(monthLambda("jan")),
engine.NewParallel(
engine.NewRequest("weather.min"),
engine.NewRequest("weather.max"),
),
@meson10
meson10 / test.md
Created December 26, 2015 12:21
Markdown Sample

Hello WOrld

@meson10
meson10 / test_gist.go
Last active December 9, 2015 10:01
dede
package main
import "fmt"
func helloWorld() {
fmt.Println("Ok")
}
func main() {
helloWorld()
func TestComposeNested(t *testing.T) {
c1 := NewPipe()
c11 := NewComposition(composeOne)
c11.SetMessage(StrMap{"merge-one": 1})
c1.Add(c11)
c2 := NewPipe()
c2.Add(NewFuncComposition(StrMap{"fake-two": 1}))