This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is the process to generate a static Azure AD SAML Service Provider (SP) Link that forces reauthentication(forceAuthN), similar to the oauth prompt=login setting: | |
1. Edit the following single line XML, replacing the acme-prod value with whatever Entity ID value was setup in the Azure AD SAML application. Notice the presence of the ForceAuthn attribute. The ID and IssueInstant can be any valid value. | |
<samlp:AuthnRequest xmlns="urn:oasis:names:tc:SAML:2.0:metadata" ID="workday_azure_ad_saml" Version="2.0" ForceAuthn="true" IssueInstant="2000-01-01T00:00:00.0000000Z" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"><Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion">http://www.workday.com/acme-prod</Issuer></samlp:AuthnRequest> | |
2. Go to https://developers.onelogin.com/saml/online-tools/code-decode/deflate-base64-encode and deflate and encode the request. | |
3. Copy the encoded value and URL encode it using any online URL encoding site | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package outlook; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; | |
import java.security.MessageDigest; | |
import java.time.format.DateTimeFormatter; | |
import java.util.GregorianCalendar; | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.Map; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String result = ""; | |
String user = "XXXX"; | |
String host = "XXXX.XXX"; | |
int port = 22; | |
String directory = "/"; | |
String sshPrivateKeyPath ="id-rsa.priv"; | |
String sshPrivateKeyPassword ="XXXXX"; | |
String sshPublicKeyPath ="id-rsa.pub"; | |
int timeout = 10000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.nio.file.StandardOpenOption; | |
import java.util.Arrays; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Simple example of embedding an arbitrary file in Excel using Apache POI mimicing the Office Insert Object functionality. | |
import java.io.ByteArrayOutputStream; | |
import java.net.URL; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import org.apache.poi.ss.usermodel.ClientAnchor; | |
import org.apache.poi.ss.usermodel.Drawing; | |
import org.apache.poi.xssf.usermodel.XSSFObjectData; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package quarkus.graphql.test; | |
import java.util.Set; | |
import javax.servlet.ServletContextEvent; | |
import javax.servlet.ServletContextListener; | |
import javax.servlet.annotation.WebListener; | |
import javax.websocket.Endpoint; | |
import javax.websocket.HandshakeResponse; | |
import javax.websocket.server.HandshakeRequest; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Example handler, in this case Excel rows are stored into an Apache Ignite cache | |
public class MappingSheetHandler extends SheetHandler { | |
IgniteCache<BinaryObject, BinaryObject> mappingCache; | |
protected Map<String, String> headerRowMapping = new HashedMap<>(); | |
protected LocationSheetHandler() { | |
mappingCache = ignite.cache("mappings").withKeepBinary(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mercer.digital.wd.intlibrary; | |
import java.math.BigDecimal; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.function.Function; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nexus setup | |
https://medium.com/@betz.mark/ten-tips-for-debugging-docker-containers-cde4da841a1d | |
https://github.com/sonatype/docker-nexus3 | |
create cluster | |
nexus-maven-repository-cluster | |
use existing VPS, select any of the subnets, create a new security group | |
T2 small instance, VM requires 1.2GB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.math.BigDecimal; | |
import java.util.HashMap; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.Map; | |
import javax.json.Json; | |
import javax.json.JsonArray; | |
import javax.json.JsonArrayBuilder; |
NewerOlder