Skip to content

Instantly share code, notes, and snippets.

View tassioauad's full-sized avatar
:octocat:

Tássio Auad tassioauad

:octocat:
View GitHub Profile
@tassioauad
tassioauad / wifimanager.cpp
Last active July 15, 2020 00:02
WifiManager
#include <WiFi.h>
#include <PubSubClient.h>
#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <DHT_U.h>
#define DHTTYPE DHT11
#define DHTPIN 2
DHT_Unified dht(DHTPIN, DHTTYPE);
{% extends 'base.html' %}
{% block body %}
<nav class="navbar navbar-light bg-light">
<span class="navbar-text">
Matriz Curricular
</span>
<select class="custom-select col-md-2" id="periodo-list">
<option selected>Selecione um Período</option>
{% for periodo in periodo_list %}
<option value="{{periodo.get_id()}}">{{periodo.get_nome()}}</option>
public class Property {
private PropertyType type;
public PropertyType getType() {
return type;
}
}
<?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>br.com.tassioauad</groupId>
<artifactId>springbootjersey</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
@Configuration
@ApplicationPath("v1")
public class JerseyConfig extends ResourceConfig {
public JerseyConfig() {
}
@PostConstruct
public void setUp() {
register(HelloWorldResource.class);
@Component
@Path("hello")
public class HelloWorldResource {
@GET
@Produces("application/json")
public String hello() {
return "Hello, world";
}
{
"_embedded" : {
"persons" : [ ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9000/person{?page,size,sort}",
"templated" : true
},
"profile" : {
@RepositoryRestResource(path = "person")
public interface PersonRepository extends PagingAndSortingRepository<Person, Long> {
}
@Entity
@Table(name = "person")
public class Person {
@Id
@Column(name = "id", nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "name", nullable = false, length = 100)
private String name;
@tassioauad
tassioauad / application.properties
Created April 4, 2018 02:17
arquivo de configuração spring boot
server.port= 9000
#-----H2
spring.h2.datasource.url=jdbc:h2:file:~/myh2
spring.h2.datasource.username=sa
spring.h2.datasource.password=
spring.h2.datasource.driver-class-name=org.h2.Driver
spring.jpa.show-sql=true