Skip to content

Instantly share code, notes, and snippets.

View ilgooz's full-sized avatar
🌔
cosmos

İlker G. Öztürk ilgooz

🌔
cosmos
View GitHub Profile
@ilgooz
ilgooz / gist:d980ed1980d6c8bf7c9c
Last active August 29, 2015 14:10
crate docker
// Dockerfile
FROM crate:latest
ADD config.yml /crate/config/crate.yml
ENV MIN 10g
ENV MAX 10g
ENV CRATE_MIN_MEM 10g
ENV CRATE_MAX_MEM 10g
package main
import (
"fmt"
"net/http"
)
func handler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:])
}
FROM golang
MAINTAINER İlker Göktuğ Öztürk <ilkergoktugozturk@gmail.com>
RUN go get ./... && go install bitbucket.org/ilgooz/pdf/app
# Install Java.
RUN \
apt-get update && \
apt-get install -y openjdk-7-jre && \
execution := application.NewExecution("v1_yyy", "send") // has Name, Info, Data inputs
mapper := application.NewMapper(func(req *application.Request) interface {} {
var data eventOutput
req.Get(&data)
data.Info = "info"
return data
})
// Wait for request event from v1_xxx service but filter with name=x.
// Package main is an application that uses functionalities from following services:
// https://github.com/mesg-foundation/service-webhook
// https://github.com/mesg-foundation/service-discord-invitation
package main
import (
"fmt"
"log"
"github.com/ilgooz/mesg-go/application"
// stream is *Stream and err is error
// err filled if we fail to listen for events
stream, err := observable3.Execute(serviceID, "send")
if err != nil {
log.Fatal(err)
}
for {
select {
case execution := <- stream.Executions:
@ilgooz
ilgooz / discord-invites.yml
Last active November 13, 2018 19:22
Discord Invites Workflow
name: discord-invites
description: |
Send discord invites to your fellows.
curl -d "email=your@email.com" -XPOST http://localhost:3000/webhook
services:
webhook: 4f7891f77a6333787075e95b6d3d73ad50b5d1e9
discord: 1daf16ca98322024824f307a9e11c88e0aba55e2
@ilgooz
ilgooz / blog.yml
Last active November 23, 2018 07:55
Blog Workflow
name: blog-tutorial
description: |
A blog workflow
Go to blog page at {$configs.domain} to publish some articles!
services:
# httpServer service serves any content over HTTP.
httpServer: https://github.com/ilgooz/service-http-server
name: location
description: Find Geo Location of an IP Address
configuration:
env:
# We're using MaxMind as a geo location database provider but it can be
# changed to another one by overwriting env variables in the deployment time.
# Note that service is responsible to respect to these env variables.
- PROVIDER=maxmind
@ilgooz
ilgooz / static-index.html
Last active February 10, 2019 20:52
MESG Live Coding Session - Subscription App
<strong>Welcome</strong>