Skip to content

Instantly share code, notes, and snippets.

@thigg
thigg / LocalDateElement.java
Created April 19, 2022 08:57
vaadin lit elements with databinding
import com.vaadin.flow.component.Tag;
import com.vaadin.flow.component.dependency.JsModule;
import com.vaadin.flow.component.littemplate.LitTemplate;
@Tag("local-date")
@JsModule("./src/local-date.ts")
public class LocalDateElement extends LitTemplate {
public LocalDateElement(long number) {
getElement().setProperty("datetime",number);
This file has been truncated, but you can view the full file.
************************************* Invoked: Sa. Apr. 3 15:46:31 2021
[0] Arguments: Downloads/SailfishSDK-3.4.9-linux64-offline.run
[0] Operations sanity check succeeded.
[3012] Loaded control script ":/metadata/installer-config/controller_qs.qs"
[3012] Using control script: ":/metadata/installer-config/controller_qs.qs"
[5695] Not replacing repository with itself "https://releases.sailfishos.org/sdk/repository-3.4.9/updates"
[5695] Not replacing repository with itself "https://releases.sailfishos.org/sdk/repository-3.4.9/updates-ea"
[5695] Not replacing repository with itself "https://releases.sailfishos.org/sdk/repository-3.4.9/common"
[5696] Not replacing repository with itself "https://releases.sailfishos.org/sdk/repository-3.4.9/linux-64"
[5696] Not replacing repository with itself "https://releases.sailfishos.org/sdk/repository-3.4.9/mac"
@thigg
thigg / check if issue still open
Created January 21, 2021 12:23
java snippet for checking if a github issue is still open. Can be used with assumeFalse to ignore tests until the resolution of the issue
@SneakyThrows
private static boolean checkIssueIsOpen(String issueCoords) {
return IOUtils.toString(new URL("https://api.github.com/repos/" + issueCoords),
StandardCharsets.UTF_8).contains("\"state\":\"open\"");
}
@thigg
thigg / constants.kt
Created August 2, 2019 11:43
converted from screepers/typed-screeps
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS", "EXTERNAL_DELEGATION", "NESTED_CLASS_IN_EXTERNAL_INTERFACE")
import kotlin.js.*
import kotlin.js.Json
import org.khronos.webgl.*
import org.w3c.dom.*
import org.w3c.dom.events.*
import org.w3c.dom.parsing.*
import org.w3c.dom.svg.*
import org.w3c.dom.url.*
@thigg
thigg / GenericFormView.java
Created September 4, 2018 13:19
A Generic Form Generator for Vaadin
package de.trinomica.profiles.view;
import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.html.Div;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.component.textfield.TextField;
import lombok.extern.java.Log;
import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;