Skip to content

Instantly share code, notes, and snippets.

View arcanrun's full-sized avatar
🏠
Working from home

arcanrun

🏠
Working from home
  • Saint-Petersburg
View GitHub Profile
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9
Mozilla/5.0 (iPad; CPU OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12H321 Safari/600.1.4
Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0)
/* Terminal */
yarn create vite my-project
cd my-project
yarn add -D tailwindcss postcss autoprefixer
yarn tailwindcss init -p
/* tailwind.config.cjs */
/** @type {import('tailwindcss').Config} */
module.exports = {

Curl with Java KeyStore

Curl doesn't have support for java keystore file, so therefor the file should be converted to a PEM format. It consists of the following multiple steps:

  1. Convert keystore to p12 file
  2. Convert p12 file to pem file
  3. Run curl command with pem files

One way TLS/SSL/Authentication

Convert keystore to p12 file

@arcanrun
arcanrun / WebServiceCaller.java
Created May 19, 2023 19:36 — forked from jeffbicca/WebServiceCaller.java
Adding header elements into a SOAP envelope and setting timeout with JAX-WS.
import javax.xml.ws.Binding;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.WebServiceRef;
import javax.xml.ws.handler.Handler;
public class WebServiceCaller implements Serializable {
private static final int MINUTES = 60000;
@WebServiceRef(wsdlLocation = "http://localhost/WebService.wsdl")
@arcanrun
arcanrun / WebServiceCaller.java
Created May 19, 2023 19:36 — forked from jeffbicca/WebServiceCaller.java
Adding header elements into a SOAP envelope and setting timeout with JAX-WS.
import javax.xml.ws.Binding;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.WebServiceRef;
import javax.xml.ws.handler.Handler;
public class WebServiceCaller implements Serializable {
private static final int MINUTES = 60000;
@WebServiceRef(wsdlLocation = "http://localhost/WebService.wsdl")
@arcanrun
arcanrun / DemoApplication.java
Created November 9, 2022 09:09 — forked from ehdez73/DemoApplication.java
Create Beans programatically with Spring Boot
package com.example;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@arcanrun
arcanrun / DemoApplication.java
Created November 9, 2022 09:09 — forked from ehdez73/DemoApplication.java
Create Beans programatically with Spring Boot
package com.example;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@arcanrun
arcanrun / KeycloakAdminClientExample.java
Created May 20, 2021 22:13 — forked from thomasdarimont/KeycloakAdminClientExample.java
Using Keycloak Admin Client to create user with roles (Realm and Client level)
package demo.plain;
import org.keycloak.OAuth2Constants;
import org.keycloak.admin.client.CreatedResponseUtil;
import org.keycloak.admin.client.Keycloak;
import org.keycloak.admin.client.KeycloakBuilder;
import org.keycloak.admin.client.resource.RealmResource;
import org.keycloak.admin.client.resource.UserResource;
import org.keycloak.admin.client.resource.UsersResource;
import org.keycloak.representations.idm.ClientRepresentation;