Skip to content

Instantly share code, notes, and snippets.

View sydseter's full-sized avatar

Johan Sydseter sydseter

View GitHub Profile
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"natGateways_owasp_name": {
"value": "owasp"
},
"sites_owaspthreatdragon_name": {
"value": "owaspthreatdragon"
},
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"natGateways_owasp_name": {
"type": "String"
},
"sites_owaspthreatdragon_name": {
"type": "String"
},
name: Deploy OWASP Threat dragon to Azure
on:
push:
branches:
- 'master'
paths:
- template.json
- parameters.json
- .github/workflows/deploy_snbx_admic_vcdm.yml
Entry 1:
Operation name
Put File Service Properties
Time stamp
Thu Dec 29 2022 16:39:40 GMT+0100 (Central European Standard Time)
Event initiated by
owasp-threat-dragon-web-app
Error code
InvalidXmlDocument
import java.util.Objects;
@FunctionalInterface
public interface TriConsumer<T, U, V> {
public void accept(T t, U u, V v);
public default TriConsumer<T, U, V> andThen(TriConsumer<? super T, ? super U, ? super V> after) {
Objects.requireNonNull(after);
return (a, b, c) -> {
@sydseter
sydseter / introspect_sql_from_hibernate_criteria_ex.java
Created March 25, 2020 08:18
Here is how you can introspect the sql from a hibernate criteria. Useful when debugging. Used with Hibernate Core 5.1
CriteriaImpl c = (CriteriaImpl)criteria;
SessionImpl s = (SessionImpl)c.getSession();
SessionFactoryImplementor factory = (SessionFactoryImplementor)session.getSessionFactory();
String[] implementors = factory.getImplementors( c.getEntityOrClassName() );
CriteriaLoader loader = new CriteriaLoader((OuterJoinLoadable)factory.getEntityPersister(implementors[0]), factory, c, implementors[0], s.getLoadQueryInfluencers());
Field f = null;
String sql = null;
try {
f = OuterJoinLoader.class.getDeclaredField("sql");
f.setAccessible(true);
using Amazon.S3;
using Amazon;
using NUnit.Framework;
using System;
using System.Diagnostics;
using Amazon.S3.Model;
using System.IO;
using System.Threading.Tasks;
using System.Net.Http;
using System.Security.Cryptography.X509Certificates;
AWSCredentials credentials = new BasicAWSCredentials("Please replace with secure AccessKey", "Please replace with secure SecretKey");
ClientConfiguration clientConfiguration = new ClientConfiguration();
clientConfiguration.setSignerOverride("AWSS3V4SignerType");
KeyStore identityKeyStore = KeyStore.getInstance("jks");
FileInputStream identityKeyStoreFile = new FileInputStream(new File("certs/identity.jks"));
identityKeyStore.load(identityKeyStoreFile, "client".toCharArray());
KeyStore trustKeyStore = KeyStore.getInstance("jks");
FileInputStream trustKeyStoreFile = new FileInputStream(new File("certs/truststore.jks"));
trustKeyStore.load(trustKeyStoreFile, "server".toCharArray());
#!/usr/bin/env bash
#
# Simple bootstrapping program for the "aptoma" project.
# Should work on Darwin and Debian
set -o nounset
set -o errtrace
set -o errexit
set -o pipefail
# Text color variables
#drfront.drfront.df-responsive .df-article .df-article-content {
background-color: red;
}