Skip to content

Instantly share code, notes, and snippets.

View urbontaitis's full-sized avatar

Mindaugas Urbontaitis urbontaitis

View GitHub Profile
@urbontaitis
urbontaitis / x410.md
Created December 17, 2020 06:18
WSL2 Linux apps using X410
{
"sidebarBg": "#073642",
"sidebarText": "#fdf6e3",
"sidebarUnreadText": "#fdf6e3",
"sidebarTextHoverBg": "#cb4b16",
"sidebarTextActiveBorder": "#b58900",
"sidebarTextActiveColor": "#fdf6e3",
"sidebarHeaderBg": "#002b36",
"sidebarHeaderTextColor": "#fdf6e3",
"onlineIndicator": "#2aa198",
{
"sidebarBg": "#fdf6e3",
"sidebarText": "#657b83",
"sidebarUnreadText": "#657b83",
"sidebarTextHoverBg": "#eee8d5",
"sidebarTextActiveBorder": "#93a1a1",
"sidebarTextActiveColor": "#fdf6e3",
"sidebarHeaderBg": "#eee8d5",
"sidebarHeaderTextColor": "#657b83",
"onlineIndicator": "#2aa198",
@urbontaitis
urbontaitis / videorental.yaml
Last active July 27, 2020 10:18
OpenAPI mock API schema
openapi: "3.0.3"
info:
version: 1.0.0
title: Swagger Video Rental Service
license:
name: MIT
servers:
- url: http://localhost:4000/api
paths:
/films:
@urbontaitis
urbontaitis / app-service-docker-compose.yaml
Created July 22, 2020 12:21
App + db + secrets volume
version: '3.3'
services:
app-db:
image: postgres:12.3
restart: "no"
ports:
- "32710:5432"
environment:
POSTGRES_USER: app_service
POSTGRES_PASSWORD: haveaniceday
@urbontaitis
urbontaitis / adoptopenjdk-dockerfile
Last active July 22, 2020 12:18
adoptopenjdk docker file: build + run
FROM maven:3.6.3-adoptopenjdk-14 as build
WORKDIR /app
COPY pom.xml /app
COPY src /app/src
RUN mvn install
FROM openjdk:14-alpine
WORKDIR /app
COPY --from=build /app/target/app.jar /app
@urbontaitis
urbontaitis / pom.xml
Created July 22, 2020 12:13
SpringBoot + Spock + Code formatter + Code coverage check
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
handleDownload = (e) => {
e.preventDefault()
axios({
method: 'get',
url: 'http://test.net/backend/api/orders/20170601_53/items/51/attachments/26',
responseType: 'arraybuffer'
}).then( (response) => {
var blob = new Blob([response.data], {type: response.headers['content-type']});
if (typeof window.navigator.msSaveBlob !== 'undefined') {