Skip to content

Instantly share code, notes, and snippets.

View martin-mfg's full-sized avatar

martin-mfg

  • Germany
  • 00:08 (UTC +02:00)
View GitHub Profile
package org.openapitools.client;
import org.openapitools.client.api.DefaultApi;
import java.time.OffsetDateTime;
public class Main {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi(new ApiClient());
String result = apiInstance.anythingGet(OffsetDateTime.now());
@martin-mfg
martin-mfg / DemoApp.java
Last active September 29, 2023 07:49
please see 1st comment below
package demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
openapi: 3.0.3
info:
title: example of a parent schema with discriminator property that is an enum
version: "2.0"
paths:
"/pet/{petId}":
get:
summary: Find pet by id
operationId: getBetById
parameters:
swagger: "2.0"
info:
title: dummy
version: dummy
paths:
/property:
post:
consumes:
- application/x-www-form-urlencoded
parameters:
swagger: '2.0'
info:
description: "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\"
version: 1.0.0
title: OpenAPI Petstore
paths:
'/':
get:
description: dummy
operationId: getSingle
@martin-mfg
martin-mfg / maven-deployer.groovy
Last active April 25, 2019 12:57 — forked from jakub-bochenski/maven-deployer.groovy
A pom.xml to batch deploy artifacts which are put under local repository folder structure to a repository. Modify the setting in <deploy.basefolder> and <distributionManagement> before use. Run `mvn install` to deploy.This file is created base on StackOverflow answer: http://stackoverflow.com/a/3304212/94148 Referenced by http://aleung.github.co…
def layout = session.lookup('org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout');
def repoFactory = session.lookup('org.apache.maven.artifact.repository.ArtifactRepositoryFactory');
def repository = repoFactory.createDeploymentArtifactRepository(
project.distributionManagement.repository.id,
project.distributionManagement.repository.url,
layout, true );
def snapshotRepository = repoFactory.createDeploymentArtifactRepository(
project.distributionManagement.snapshotRepository.id,
@martin-mfg
martin-mfg / geotools_PolygonExtractionProcess_demo.java
Created March 29, 2018 15:18
GeoTools PolygonExtractionProcess demo
public static void main(String[] args) throws Exception
{
final int WIDTH = 5;
final int HEIGHT = 5;
GridCoverageBuilder builder = new GridCoverageBuilder();
builder.setEnvelope(0, 0, WIDTH, HEIGHT); // x_min, y_min, x_max, y_max
/*
According to the documentation, the min and max allowed values for the coordinates are to be specified here,
snow = {
count: 60,
delay: 20,
flutter: 0.2,
wobble: 0.5,
spin: 1.0,
wind: 1.0,
w1: 1,
minSpeed: 0.3,
maxSpeed: 4,
#include <Date.au3>
#include <Array.au3>
#include <Constants.au3>
Local $iUnixTime1 = _GetUnixTime()
MsgBox($MB_SYSTEMMODAL, 'Seconds Since Jan, 1st, 1970 00:00:00 GMT', $iUnixTime1)
Local $sUnixDate1 = _GetDate_fromUnixTime($iUnixTime1)
MsgBox($MB_SYSTEMMODAL, "", $sUnixDate1)
/**
* Updates the edit node
*
* @param {Ext.tree.TreeNode} node
* @param {String} editableText
* @param {String} updatedNode
* @return {void}
*/
updateNodeText: function(node, editableText, updatedNode) {
node.setText(this.editNode.attributes.prefix + updatedNode + this.editNode.attributes.suffix);