Skip to content

Instantly share code, notes, and snippets.


Giovanni Lovato heruan

View GitHub Profile
heruan / plurals.php
Created Mar 4, 2013
Code generated by jison PHP port
View plurals.php
/* Jison generated parser */
class Parser
var $symbols_ = array();
var $terminals_ = array();
var $productions_ = array();
var $table = array();
var $defaultActions = array();
heruan / gist:7458185
Created Nov 13, 2013
Boxen installation on Mavericks fails
View gist:7458185
$ sudo mkdir -p /opt/boxen
$ sudo chown ${USER}:staff /opt/boxen
$ git clone /opt/boxen/repo
$ cd /opt/boxen/repo
$ git remote rm origin
$ git remote add origin
$ git push -u origin master
$ script/boxen
Warning: Permanently added the RSA host key for IP address '' to the list of known hosts.
Boxen is up-to-date.
heruan / arr.json
Created May 29, 2015
Mapping JSON parsed object instances
View arr.json
"name": "John",
"age": 20
"name": "Jack",
"age": 28
heruan /
Created Feb 26, 2016
Entity with multiple reference to a composite-id foreign key throws EntityExistsException
public class Company {
public Long id;
heruan / app.html
Created Aug 10, 2016 — forked from jdanyow/app.html
Aurelia Validation Demo
View app.html
<require from="./registration-form"></require>
heruan / flexbox.scss
Created Jan 26, 2017
Simple theme to make Valo layouts flexible
View flexbox.scss
@import "../valo/valo";
.flexbox {
@include valo;
.v-layout, .v-slot {
display: flex;
flex-wrap: wrap;
heruan /
Created Jun 16, 2017
Vaadin Resource for FileDownload which consumes OutputStream
import java.util.Iterator;
import java.util.function.Consumer;
import javax.servlet.http.HttpServletResponse;
import com.vaadin.server.Constants;
import com.vaadin.server.DownloadStream;
import com.vaadin.server.VaadinRequest;
View test-client-default-value.diff
diff --git a/flow-html-components/src/test/java/com/vaadin/ui/html/ b/flow-html-components/src/test/java/com/vaadin/ui/html/
index bd670982ff..c92bc10f41 100644
--- a/flow-html-components/src/test/java/com/vaadin/ui/html/
+++ b/flow-html-components/src/test/java/com/vaadin/ui/html/
@@ -23,19 +23,20 @@ import com.vaadin.ui.Component;
public class ComponentProperty {
public String name;
- public Object defaultValue, otherValue;
+ public Object defaultValue, otherValue, clientDefault;
heruan /
Last active Nov 21, 2017
Transactional DataCommunicator and Grid for Flow
import java.util.function.Predicate;
import java.util.function.Supplier;
public class StreamDataProvider<T> extends AbstractBackEndDataProvider<T, Predicate<T>> {
private final Supplier<Stream<T>> streamSupplier;
import java.util.Comparator;
import java.util.Optional;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class CustomComparatorTest {
static class CustomComparator<T> implements Comparator<T> {