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 / query.js
Created February 22, 2024 12:29
query
test3.blocks.aggregate([
{
$search: {
index: "block-files-idx",
phrase: {
query: "// method proxies as public functions",
path: "block_body.block_data.txs.msg.package.files.body"
}
@ilgooz
ilgooz / import_poll.go
Last active February 12, 2024 11:43
Poll Contract Gno.Town
import (
"strings"
"gno.land/p/demo/ufmt"
)
@ilgooz
ilgooz / main.go
Created February 1, 2024 18:03
main.go
package main
@ilgooz
ilgooz / static-index.html
Last active February 10, 2019 20:52
MESG Live Coding Session - Subscription App
<strong>Welcome</strong>
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 / 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
@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
// 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:
// 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"
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.