Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Read my code at https://gitlab.com/k33g

Philippe Charrière k33g

💭
Read my code at https://gitlab.com/k33g
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am k33g on github.
  • I am k33g (https://keybase.io/k33g) on keybase.
  • I have a public key ASAvVVJc_l0qLskykv6CDC9l0gvGedBfs_msgZg0T8pznwo

To claim this, I am signing this object:

View Dockerfile
FROM node:12.7.0-alpine
WORKDIR /home/app
COPY . .
RUN npm install
RUN addgroup -S app \
&& adduser app -S -G app
RUN chown app:app -R /home/app
WORKDIR /home/app
@k33g
k33g / Main.java
Created May 3, 2018
RedPipe 1er contact
View Main.java
package garden.bots;
import net.redpipe.engine.core.Server;
import io.vertx.core.json.JsonObject;
import java.util.Optional;
public class Main {
public static void main(String[] args) {
JsonObject config = new JsonObject();
config.put("http_port", 8080);
@k33g
k33g / StaticResource.java
Created May 3, 2018
RedPipe 1er contact
View StaticResource.java
package garden.bots;
import net.redpipe.engine.resteasy.FileResource;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.Response;
import java.io.IOException;
@Path("/{path:(.*)?}")
@k33g
k33g / index.html
Created May 3, 2018
RedPipe 1er contact
View index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Hello World!</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.container { min-height: 100vh; display: flex; justify-content: center; align-items: center; text-align: center; }
@k33g
k33g / Main.java
Created May 3, 2018
RedPipe 1er contact
View Main.java
package garden.bots;
import net.redpipe.engine.core.Server;
import io.vertx.core.json.JsonObject;
import java.util.Optional;
public class Main {
public static void main(String[] args) {
JsonObject config = new JsonObject();
config.put("http_port", 8080);
@k33g
k33g / HelloResource.java
Last active May 12, 2018
HelloResource
View HelloResource.java
package garden.bots;
import io.vertx.core.json.JsonObject;
import javax.ws.rs.Produces;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
@Path("/hello")
public class HelloResource {
@k33g
k33g / pom.xml
Created May 3, 2018
Redpipe 1er contact
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>garden.bots</groupId>
<artifactId>hello</artifactId>
<name>hello</name>
<version>1.0-SNAPSHOT</version>
@k33g
k33g / skeleton.txt
Created May 3, 2018
Redpipe 1er contact
View skeleton.txt
.
├── pom.xml
├── src
│ ├── main
│ │ ├── java
│ │ │ └── garden
│ │ │ └── bots
│ │ │ ├── HelloResource.java
│ │ │ └── Main.java
│ │ └── resources
@k33g
k33g / sample01.java
Created May 3, 2018
Redpipe 1er contact
View sample01.java
import javax.ws.rs.GET;
import javax.ws.rs.Path;
@Path("/")
public class HelloResource {
@GET
public String hello() {
return "Hello World";
}
}