Skip to content

Instantly share code, notes, and snippets.

View markoradinovic's full-sized avatar

Marko Radinovic markoradinovic

View GitHub Profile
@markoradinovic
markoradinovic / ubuntu-maven-3
Created January 19, 2016 19:40 — forked from stephanetimmermans/ubuntu-maven-3
Install Maven3 on Unbuntu 14.04
#sudo apt-get remove maven2
sudo add-apt-repository "deb http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main"
sudo apt-get update
sudo apt-get install maven3
#If you encounter this:
#The program 'mvn' can be found in the following packages:
# * maven
# * maven2
@markoradinovic
markoradinovic / JettyConfig.java
Created January 16, 2016 20:22 — forked from fastnsilver/JettyConfig.java
A possible way to bring together AWS CloudWatch and ServoMetrics observers in a Jetty Container
@Configuration
public class JettyConfig {
@Autowired
private MetricRegistry metricRegistry;
public Server jettyServer(int maxThreads, int minThreads, int idleTimeout) {
QueuedThreadPool threadPool = new InstrumentedQueuedThreadPool(metricRegistry);
threadPool.setMaxThreads(maxThreads);
threadPool.setMinThreads(minThreads);
@markoradinovic
markoradinovic / binding.xml
Created January 6, 2016 12:56
jaxb binding settings
<jaxb:bindings
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" jaxb:extensionBindingPrefixes="xjc">
<jaxb:globalBindings generateElementProperty="false">
<xjc:simple />
</jaxb:globalBindings>
</jaxb:bindings>
wsimport -keep -d test/ -extension -b binding.xml -Xdebug -Xno-addressing-databinding -Xnocompile -B-XautoNameResolution -XadditionalHeaders -target 2.2 eracuni.wsdl
@markoradinovic
markoradinovic / autobuild-openconnect-7-ubuntu.sh
Last active April 4, 2016 12:55 — forked from darrenpmeyer/autobuild-openconnect-7-ubuntu.sh
Autobuild script for OpenConnect 7 (Ubuntu 14/15 trusty/vivid)
#!/usr/bin/env bash
oc_ver="7.06"
echo "Autobuild OpenConnect $oc_ver"
echo " "
echo "This script uses apt-get and make install via sudo rights"
echo "To simplify this, we're going to use sudo -v to pre-authenticate you"
sudo -k
sudo -v
@markoradinovic
markoradinovic / gist:81e0ff3c0b3ba2a438c1
Created February 13, 2015 21:24
SSL Import to java keystore
# Create PKCS12 keystore from private key and public certificate.
openssl pkcs12 -export -name myservercert -in selfsigned.crt -inkey server.key -out keystore.p12
# Convert PKCS12 keystore into a JKS keystore
keytool -importkeystore -destkeystore mykeystore.jks -srckeystore keystore.p12 -srcstoretype pkcs12 -alias myservercert
keytool -list -v -keystore mykeystore.jks
select *
from ( select a.*, rownum rnum
from ( SELECT * FROM MAILBOX_MESSAGE order by MESSAGE_ID ) a
where rownum <= 10 )
where rnum >= 6
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 8.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :20141129
#usage :/bin/bash wildfly-install.sh
WILDFLY_VERSION=8.2.0.Final
WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION
@markoradinovic
markoradinovic / gist:1d94a72b63e5f5685d2f
Created December 30, 2014 16:08
WildFly virtualhost
<?xml version="1.0"?>
<jboss-web>
<session-config>
<cookie-config>
<domain>special.mydomain.com</domain>
<path>/</path>
</cookie-config>
</session-config>
</jboss-web>