Skip to content

Instantly share code, notes, and snippets.

View ivancorrales's full-sized avatar
🐾
Doing what I love to do!

Iván Corrales Solera ivancorrales

🐾
Doing what I love to do!
View GitHub Profile
package main
import (
"errors"
"fmt"
"time"
)
var times = map[string]float32{
"very-slow": 4,
@ivancorrales
ivancorrales / goatimes.csv
Created November 23, 2019 12:52
Table used for time measurement with Goa article
function delay
very-slow 4s
slow 4s
medium 3s
fast 2s
veryf-fast 1s
git clone https://github.com/wesovilabs/CD_nodejs.git
cd CD_nodejs
git remote set-url origin http://localhost:3000/developer/CD_nodejs.git
git add .
git commit -m "feat: initial commit"
git push origin master
git clone https://github.com/wesovilabs/CD_Simulator.git
cd CD_Simulator
## Run containers in detach mode
make run
## It display logs
make logs
@ivancorrales
ivancorrales / Dockerfile
Created July 27, 2019 05:35
a multi-stage build
FROM golang:1.12.5 AS ci-lint
ENV CGO_ENABLED=0 GOFLAGS="-mod=vendor"
WORKDIR /app
ADD . /app
RUN go run github.com/golangci/golangci-lint/cmd/golangci-lint run --verbose
FROM golang:1.12.5 AS ci-test_unit
ENV CGO_ENABLED=0 GOFLAGS="-mod=vendor"
WORKDIR /app
ADD . /app
dependencies {
compile 'com.graphql-java-kickstart:graphql-spring-boot-starter:5.2'
compile 'com.graphql-java-kickstart:graphiql-spring-boot-starter:5.2'
compile 'com.graphql-java-kickstart:voyager-spring-boot-starter:5.2'
testCompile 'com.graphql-java-kickstart:graphql-spring-boot-starter-test:5.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-reactive:1.0.0'
compile "io.reactivex.rxjava2:rxjava:2.1.5"
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
runtimeOnly 'org.postgresql:postgresql'
@ivancorrales
ivancorrales / schema.graphql
Last active March 4, 2019 04:40
GraphQL schema
schema {
# The query root of Workshop GraphQL interface.
query: Query
# The root query for implementing GraphQL mutations.
mutation: Mutation
# The root query for implementing GraphQL subscriptions.
subscription: Subscription
}
query {
getMeeting(meetingId:"meeting001"){
id
organizer{
identifier
firstname
lastname
email
salary(currency:Euro)
}
mutation{
createRoom1:addRoom(room:{id:"room01",capacity:5}){
id
}
createRoom2: addRoom(room:{id:"room02",capacity:6}){
id
capacity
}
createRoom3: addRoom(room:{id:"room03",capacity:8}){
capacity
@ivancorrales
ivancorrales / workshop-schema.graphql
Created January 23, 2019 06:53
graphl-schema-documented
# This schema is used for wokshop
"""Custom scalar type for emails"""
scalar Email
"""Custom scalar type for date times"""
scalar Datetime
"""This scalar type is used for Url's"""
scalar Url
# In the future we could add new currencies if required