Skip to content

Instantly share code, notes, and snippets.

View Qleoz12's full-sized avatar
🎯
Focusing

qleoz12 Qleoz12

🎯
Focusing
View GitHub Profile
@Qleoz12
Qleoz12 / HibernatePersistenceProviderResolver.java
Last active July 21, 2020 17:45 — forked from jeffsheets/HibernatePersistenceProviderResolver.java
Use JPA 2.1 and Hibernate 4.3.11 on Websphere 8.5.5.x FIX Validate Using
import org.hibernate.jpa.HibernatePersistenceProvider;
import org.springframework.context.annotation.Configuration;
import javax.annotation.PostConstruct;
import javax.persistence.spi.PersistenceProvider;
import javax.persistence.spi.PersistenceProviderResolver;
import javax.persistence.spi.PersistenceProviderResolverHolder;
import java.util.Collections;
import java.util.List;
@Qleoz12
Qleoz12 / pom.xml
Created May 6, 2020 03:48 — forked from rodrik/pom.xml
Sample pom.xml file to enable spring-boot on WAS 8.5.5 running jdk1.6
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.rodrik</groupId>
<artifactId>spring-boot-was</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<java.version>1.6</java.version>
</properties>
@Qleoz12
Qleoz12 / Cryptography.java
Created June 20, 2019 20:02 — forked from Diederikjh/Cryptography.java
Single class that handles encryption and decryption with keys using the Android `Keystore` API. Mostly inspired by this [blog post](https://medium.com/@ericfu/securely-storing-secrets-in-an-android-application-501f030ae5a3). This was tested with API 18 and 25 level emulator (and a level 23 device).
package com.example.yourapp;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Build;
import android.security.KeyPairGeneratorSpec;
import android.security.keystore.KeyGenParameterSpec;
import android.security.keystore.KeyProperties;
import android.support.annotation.RequiresApi;
public static void waitForPageLoad(WebDriver drv) {
sleep(50); // Make sure new page init has started...
try {
(new WebDriverWait(drv, 5))
.until(new ExpectedCondition<Boolean>() {
public Boolean apply(WebDriver d) {
return ((JavascriptExecutor)d).executeScript("return document.readyState").equals("complete");
}
});
} catch (TimeoutException ex) {
@Qleoz12
Qleoz12 / css-comparison.csv
Created January 15, 2019 14:38 — forked from primaryobjects/css-comparison.csv
A comparison of CSS library sizes.
Name Version Size (uncompressed) Size (minified) Size (gzipped) URL
Bootstrap v3.3.7 143 KB 117 KB 20 KB http://getbootstrap.com/css/
Bootstrap v4.0.0 187 KB 147 KB 20 KB https://v4-alpha.getbootstrap.com/
Materialize v3.0 114 KB 90 KB 18 KB http://materializecss.com/
Material Design Lite v1.3.0 350 KB 137 KB 21 KB https://getmdl.io/
mini.css v2.1 47 KB 36 KB 7 KB https://chalarangelo.github.io/mini.css/
Semantic UI v2.2.6 730 KB 550 KB 95 KB https://semantic-ui.com/
Foundation v3.0 90 KB 64 KB 12 KB http://foundation.zurb.com/
Pure CSS v0.6.2 80 KB 17 KB 3.8 KB https://purecss.io/
Picnic CSS v6.3.2 55 KB 38 KB 7 KB https://picnicss.com
@Qleoz12
Qleoz12 / MD5 Hash Function.vbs
Created May 31, 2018 18:02 — forked from janikvonrotz/MD5 Hash Function.vbs
MSAccess: MD5 Hash Function #VisualBasic #MSAccess
Option Explicit
Option Base 0
' A VB6/VBA procedure for the MD5 message-digest algorithm
' as described in RFC 1321 by R. Rivest, April 1992
' First published 16 September 2005.
' Updated 2010-10-20 to fix ">" vs ">=" issue in uwAdd.
' --Thanks to Loek for this.
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶