Skip to content

Instantly share code, notes, and snippets.

View baxtheman's full-sized avatar

Daniele Baggio baxtheman

View GitHub Profile
{
"Client_ID": "571358931HB160700000",
"rad_Name": "Bathroom downstaris"
}
@baxtheman
baxtheman / gradle.settings
Created December 27, 2016 17:05
by Andrea Di Giorgi
configurations {
embeddedLibs
compileOnly.extendsFrom embeddedLibs
}
dependencies {
embeddedLibs group: 'org.hibernate', name: 'hibernate-core', version: '5.2.5.Final'
}
@baxtheman
baxtheman / map.js
Created February 1, 2017 08:37
Google Map dark theme
map = new google.maps.Map(document.getElementById('gmaps'), {
zoom: 5,
center: {
lat: 43,
lng: 12
},
mapTypeId: google.maps.MapTypeId.ROADMAP,
styles: [{
"stylers": [{
"hue": "#ff1a00"
@baxtheman
baxtheman / TestNativeQueryToListJson.java
Created October 20, 2017 14:25
Java JPA Native Query using Tuple and return List of Jackson JSON Object
/*
Needs Hibernate 5.2.11.Final
*/
public List<ObjectNode> getQuery(
Integer anno,
Integer settimana) {
Query q = em.createNativeQuery(
"NATIVE SQL....",Tuple.class);
[INFO] Eclipse Milo Build Tools ........................... SUCCESS [ 1.591 s]
[INFO] Eclipse Milo - OPC-UA (IEC 62541) .................. SUCCESS [ 2.323 s]
[INFO] opc-ua-stack ....................................... SUCCESS [ 1.592 s]
[INFO] stack-core ......................................... SUCCESS [ 21.689 s]
[INFO] stack-client ....................................... SUCCESS [ 1.886 s]
[INFO] opc-ua-sdk ......................................... SUCCESS [ 1.695 s]
[INFO] sdk-core ........................................... SUCCESS [ 5.960 s]
[INFO] bsd-parser ......................................... SUCCESS [ 1.108 s]
@baxtheman
baxtheman / sendmail.script
Created July 17, 2018 08:28
Liferay, mail send test script (via beanshell)
import com.liferay.util.mail.MailEngine;
import javax.mail.internet.InternetAddress;
MailEngine.send(new InternetAddress("[email protected]"),
new InternetAddress("[email protected]"),
"test email sub", "HOLA, this is the body", false);
@baxtheman
baxtheman / MailEngine.beanshell
Last active October 15, 2018 07:47 — forked from leetcope/new_gist_file
liferay mail send test script (beanshell)
import com.liferay.util.mail.MailEngine; import javax.mail.internet.InternetAddress;
MailEngine.send(new InternetAddress("[email protected]"),
new InternetAddress("[email protected]"),
"your-appointment-has-been-scheduled",
"HOLA", false);
[
{
"expanded": true,
"children": [
{
"label": "TEMP_DU1",
"id": "9",
"type": "check",
"leaf": true
}
[
{
"dateTime": 1558606273941,
"entry": "Box Temperature",
"entryType": "String",
"gravityId": "4",
"gravityTypeData": {
"additional": "0",
"shortDescription": "Info"
@baxtheman
baxtheman / web-content-template.ftl
Last active May 30, 2022 09:52
Liferay 7, web content template freemarker context variables
<#assign TITLE = .vars['reserved-article-title'].data />
<#assign DISPLAYDATE = .vars['reserved-article-display-date'].data?date('EEE, dd MMM yyyy HH:mm:ss Z') />
${DISPLAYDATE?string["dd MMMM yyyy"]}
<button type="button" class="btn btn-secondary btn-sm">
<@liferay_ui["message"] key="read-more"/>
</button>