Skip to content

Instantly share code, notes, and snippets.

Name Description
Apache Camel Camel is an Open Source integration framework that empowers you to quickly and easily integrate various systems consuming or producing data.
Apache Commons Lang My fav : StringUtils.
Axon Framework One of the best libraries for you to learn DDD, CQRS, Event-Sourcing
Caffeine A high performance, near optimal caching library based on Java 8 and a faster replacement of Guava Cache.
Camunda BPM My initial impression is easier to use than Activiti
Content Services for Spring Cloud-Native Content Management Extensions for Spring.
cron-utils De
\documentclass[
fromalign=left, % letter head on the right
fromphone, % show phone number
fromaddress,
fromemail, % show email
version=last, % latest version of KOMA letter
refline=dateleft, % aligns both the city and the date to the left
backaddress=off, % Sender address in this window
foldmarks=on, % Print foldmarks
parskip=full,
@mallim
mallim / logstash.conf
Created July 19, 2016 03:15
Logstash config for Spring Boot's default logging
input {
file {
type => "java"
tags => [ "fornax-data-share-eureka" ]
# Logstash insists on absolute paths...
path => "D:/fornax-data-share-runtime/eureka/fornax-data-share-eureka.log"
codec => multiline {
pattern => "^%{YEAR}-%{MONTHNUM}-%{MONTHDAY} %{TIME}.*"
negate => "true"
what => "previous"
@mallim
mallim / SQLiteDialect.java
Created January 15, 2016 08:38 — forked from virasak/SQLiteDialect.java
SQLite dialect for Hibernate
/*
* The author disclaims copyright to this source code. In place of
* a legal notice, here is a blessing:
*
* May you do good and not evil.
* May you find forgiveness for yourself and forgive others.
* May you share freely, never taking more than you give.
*
*/
package org.hibernate.dialect;
@mallim
mallim / ErrorLog.java
Created April 7, 2015 01:40
Stacktrace of Error Encountered @ Weblogic 12c, JDK 1.7, Eclipse 2.6.0
####<Apr 6, 2015 7:42:25 PM SGT> <Error> <Class Loaders> <ISPS-APP> <AdminServer> <[STANDBY] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1428320545119> <BEA-2162500> <Class, org.eclipse.persistence.internal.indirection.jdk8.IndirectCollectionsProvider, was compiled with an incompatible version of Java. Make sure that all the classes needed by the application have been compiled with a compatible java version. java.lang.UnsupportedClassVersionError: org/eclipse/persistence/internal/indirection/jdk8/IndirectCollectionsProvider : Unsupported major.minor version 52.0
java.lang.UnsupportedClassVersionError: org/eclipse/persistence/internal/indirection/jdk8/IndirectCollectionsProvider : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at weblogic.utils.classloaders.GenericClassLoader.defineCl
.exec(http("PERFORM A FILE UPLOAD")
.post("YOUR_DESIRED_URL_FOR_UPLOAD")
.body(ELFileBody("THE_FILE_TO_UPLOAD"))
.check(
status.is(200),
).asMultipartForm)
.exec(http("Goto Your Desired URL")
.get("http://THIS_SHOULD_BE_YOUR_URL")
.check(
status.is(200),
bodyString.saveAs("responseBody")
)
)
.exec(
session => {
// You can do whatever you want with the string
@mallim
mallim / WebSecurityConfig.java
Created June 27, 2014 13:31
Spring Boot's Spring Security Web Security Config
import org.sbangular.security.UnauthorisedEntryPoint;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
@mallim
mallim / stream_logging.js
Created June 22, 2014 01:02
Console logging stream. Useful for node stream debugging
var es = require('event-stream');
var logger = es.mapSync(function (data) { //create a stream that logs to stderr,
console.error(data);
return data;
});

API workthough

  1. Open a browser

    # start an instance of firefox with selenium-webdriver
    driver = Selenium::WebDriver.for :firefox
    # :chrome -> chrome
    # :ie     -> iexplore
    
  • Go to a specified URL