Skip to content

Instantly share code, notes, and snippets.

View filiperdt's full-sized avatar

Rúben Filipe Andrade de Oliveira filiperdt

View GitHub Profile
@filiperdt
filiperdt / index.html
Created May 5, 2021 21:55
Minimum page Thymeleaf and Bootstrap
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
<title>Thymeleaf and Bootstrap</title>
@filiperdt
filiperdt / printEnum.java
Created May 5, 2021 18:31
Enum function to print values ​​with the first capital letter
@Override
public String toString() {
return Character.toUpperCase(name().charAt(0)) + name().toLowerCase().substring(1);
}
@filiperdt
filiperdt / printConsole.html
Created April 29, 2021 22:56
Print Thymeleaf variable in console.log
<script th:inline="javascript">
/*<![CDATA[*/
console.log(/*[[${myVariable.id}]]*/ 'default');
/*]]>*/
</script>