Skip to content

Instantly share code, notes, and snippets.

View rockey5520's full-sized avatar

Rakesh Mothukuri rockey5520

View GitHub Profile
buildscript {
repositories {
mavenLocal()
}
dependencies {
classpath "io.quarkus:quarkus-gradle-plugin:${quarkusVersion}"
}
}
plugins {
quarkusVersion = 0.24.0
@rockey5520
rockey5520 / builld.gradle
Created October 12, 2019 12:51
builld.gradle
buildscript {
repositories {
mavenLocal()
}
dependencies {
classpath "io.quarkus:quarkus-gradle-plugin:${quarkusVersion}"
}
}
plugins {
@rockey5520
rockey5520 / settings.gradle
Created October 12, 2019 12:52
settings.gradle
pluginManagement {
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
}
resolutionStrategy {
eachPlugin {
if (requested.id.id == 'io.quarkus') {
useModule("io.quarkus:quarkus-gradle-plugin:${quarkusVersion}")
package org.rockey.hello;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
package org.rockey.hello;
import javax.enterprise.context.ApplicationScoped;
@ApplicationScoped
public class GreetingService {
public String greeting(String name) {
return "hello " + name;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>getting-started - 1.0-SNAPSHOT</title>
<style>
h1, h2, h3, h4, h5, h6 {
margin-bottom: 0.5rem;
font-weight: 400;
line-height: 1.5;
@rockey5520
rockey5520 / variableassingment
Created January 26, 2020 20:31
Variable assignment in Go
package main
import "fmt"
func main() {
var k int = 3
//:= is short assignment can be used in place of var declaration with implicit type.
l := 3
fmt.Println(k, l)
package main
import "fmt"
func main() {
var i int
fmt.Println(i)
}
package main
import "fmt"
var i, j int = 1, 2
func main() {
var c, python, java = true, false, "no!"
fmt.Println(i, j, c, python, java)
}