Skip to content

Instantly share code, notes, and snippets.

View ntakouris's full-sized avatar
🤖
Building robots

Theodoros Ntakouris ntakouris

🤖
Building robots
View GitHub Profile
stage('Build'){
echo 'Building Executable'
//Produced binary is $GOPATH/src/cmd/project/project
sh """cd $GOPATH/src/cmd/project/ && go build -ldflags '-s'"""
}
stage('BitBucket Publish'){
//Find out commit hash
sh 'git rev-parse HEAD > commit'
def commit = readFile('commit').trim()
//Find out current branch
sh 'git name-rev --name-only HEAD > GIT_BRANCH'
def branch = readFile('GIT_BRANCH').trim()
package com.eventora.mobile.app.util;
import android.arch.lifecycle.LiveData;
import android.arch.lifecycle.MediatorLiveData;
import android.arch.lifecycle.MutableLiveData;
import android.support.annotation.MainThread;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.WorkerThread;
@BOARD AT91
.arm
.text
.global main
main:
STMDB R13!, {R0-R12, R14}
LDR R0, =Values
LDR R4, =Const
var _ = Desc("hello", "Say Hello!")
var _ = Add("hello", func(c *Context) error {
fmt.Println("Hello World!")
return nil
})
package grifts
import (
. "github.com/markbates/grift/grift"
)
var _ = Desc("<task-name>", "Task Description")
var _ = Add("<task-name>", func(c *Context) error {
return nil
})
package mailers
import (
"github.com/gobuffalo/buffalo/mail"
"github.com/gobuffalo/buffalo/render"
"github.com/pkg/errors"
)
func SendMailerName() error {
m := mail.NewMessage()
@ntakouris
ntakouris / Dockerfile
Created January 21, 2018 18:08
gobuffalo
# This is a multi-stage Dockerfile and requires >= Docker 17.05
# https://docs.docker.com/engine/userguide/eng-image/multistage-build/
FROM gobuffalo/buffalo:v0.10.3 as builder
RUN mkdir -p $GOPATH/src/github.com/username/app-name
WORKDIR $GOPATH/src/github.com/username/app-name
# this will cache the npm install step, unless package.json changes
ADD package.json .
ADD yarn.lock .
package actions
func (as *ActionSuite) Test_ActionName_ActionHandler() {
as.Fail("Not Implemented!")
}
package actions
import "github.com/gobuffalo/buffalo"
// ActionNameActionActionNameHandler default implementation.
func ActionNameActionActionNameHandler(c buffalo.Context) error {
return c.Render(200, r.HTML("<action-name>/<action-name-handler>.html"))
//or
return c.Render(200, r.HTML("<action-name>/<action-name-handler>_skip_template.html"))
}