Skip to content

Instantly share code, notes, and snippets.

View alexproca's full-sized avatar

Alex Proca alexproca

View GitHub Profile
# How to perform a release with git & maven following the git flow conventions
# ----------------------------------------------------------------------------
# Finding the next version: you can see the next version by looking at the
# version element in "pom.xml" and lopping off "-SNAPSHOT". To illustrate,
# if the pom's version read "0.0.2-SNAPSHOT", the following instructions would
# perform the release for version "0.0.2" and increment the development version
# of each project to "0.0.3-SNAPSHOT".
# branch from develop to a new release branch
git checkout develop
@alexproca
alexproca / UnedifactUtil.groovy
Created January 10, 2014 19:02
Count unedifact segments
import org.milyn.smooks.edi.EDIWritable
class UnedifactUtil {
public static int countSegments(final EDIWritable origmessage) {
def isSegmentGroup = { it?.class?.canonicalName?.contains('SegmentGroup') }
def countInDepthSegments
countInDepthSegments = { EDIWritable message ->
@alexproca
alexproca / CPVCodes.xsd
Last active June 18, 2017 12:30
CPV Codes as XML
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="CPVCodes">
<xs:complexType>
<xs:sequence>
<xs:element name="Division" type="Division" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="Division">
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.ZipInputStream;
/**
* This class is a wrapper for ZipInputStream.
* If you try to put ZipInputStream in a InputStreamReader you will get
* an error because when close() is called the whole ZipInputStream will
* be closed. For reading only a part from the stream corresponding to a
* ZipEntry, instead of calling stream.close() you should call stream.closeEntry()
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Module">
<xs:complexType>
<xs:sequence>
<xs:element name="ModulePrefs" minOccurs="0">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Require" type="GadgetFeatureType"/>
<xs:element name="Optional" type="GadgetFeatureType"/>
@alexproca
alexproca / openfire.yml
Created June 8, 2015 21:30
Docker Compose for Openfire XMPP server
xmpp:
image: sameersbn/openfire:latest
restart: always
hostname: xmpp.alexproca.ro
ports:
- "80:9090"
- "5222:5222"
- "5223:5223"
- "7777:7777"
- "7070:7070"
@alexproca
alexproca / databases docker-compose.yml
Last active August 29, 2015 14:24
Docker compose for databases
postgresql:
image: postgres:9.4
volumes_from:
- postgres
ports:
- "127.0.0.1:5432:5432"
hostname: postgres
restart: always
tty: true
#HTTP
telnet google.com 80
GET /index.html HTTP/1.1
Host: www.google.com
#HTTPS
openssl s_client -connect google.com:443
GET / HTTP/1.1
@alexproca
alexproca / shipyard-deploy.sh
Created September 20, 2015 16:19
Custom shipyard deploy
#!/bin/bash
if [ "$1" != "" ] && [ "$1" = "-h" ]; then
echo "Shipyard Deploy uses the following environment variables:"
echo " ACTION: this is the action to use (deploy, upgrade, remove)"
echo " IMAGE: this overrides the default Shipyard image"
echo " PREFIX: prefix for container names"
echo " SHIPYARD_ARGS: these are passed to the Shipyard controller container as controller args"
echo " TLS_CERT_PATH: path to certs to enable TLS for Shipyard"
exit 1
@alexproca
alexproca / install-jira.sh
Last active November 9, 2015 23:00
Docker compose intall jira 7
#!/bin/bash
cd /tmp
apt-get install wget -y
wget https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-7.0.0-jira-7.0.0-x64.bin
chmod +x /tmp/atlassian-jira-software-7.0.0-jira-7.0.0-x64.bin
echo "executeLauncherAction$Boolean=true" > unattended
echo "app.install.service$Boolean=true" >> unattended
echo "sys.confirmedUpdateInstallationString=false" >> unattended
echo "existingInstallationDir=/usr/local/JIRA Software" >> unattended
echo "sys.languageId=en" >> unattended