Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="echoProxy"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<property name="URL" value="http://host:8280?p1=abc&amp;p2=qwe"/>
@imesh
imesh / generate-ssl-key-crt.sh
Created June 20, 2014 09:25
Generate a SSL Key and a Certificate
echo "Creating a local Certificate Authority using OpenSSL ..."
openssl genrsa -des3 -out ca.key 1024
echo "Building the certificate of Certificate Authority ..."
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@imesh
imesh / cartridge-creator.sh
Last active August 29, 2015 14:02
Install puppet agent and required puppet module to create cartridge image
#!/bin/bash
# ------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
@imesh
imesh / create-stratos-source-release.sh
Last active August 29, 2015 14:02
Create source release from parent source pack generated in maven release build
set -e
pgp_key_id=622AA831
stratos_version=4.0.0
stratos_parent_source_release=stratos-parent-${stratos_version}-source-release
stratos_source_release=apache-stratos-${stratos_version}-source-release
echo "Unzipping stratos parent source package..."
unzip ${stratos_parent_source_release}.zip
@imesh
imesh / pr.md
Created June 4, 2014 12:43 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

<api xmlns="http://ws.apache.org/ns/synapse" name="listUsers" context="/listUsers">
<resource methods="GET" inSequence="ListUsersInSeq" outSequence="ListUsersOutSeq">
<faultSequence/>
</resource>
</api>
<sequence xmlns="http://ws.apache.org/ns/synapse" name="ListUsersOutSeq">
<log level="full"/>
<property name="messageType" value="application/json" scope="axis2" type="STRING"/>
<send/>
</sequence>
@imesh
imesh / listAllUsersInSeq.xml
Created May 15, 2014 13:31
List all users in sequence.
<sequence xmlns="http://ws.apache.org/ns/synapse" name="ListUsersInSeq">
<payloadFactory media-type="xml">
<format>
<xsd:listAllUsers xmlns:xsd="http://org.apache.axis2/xsd">
<xsd:filter>$1</xsd:filter>
<xsd:limit>$2</xsd:limit>
</xsd:listAllUsers>
</format>
<args>
<arg xmlns:m0="http://services.samples" evaluator="xml" expression="$url:filter"/>
set -e
log=download_from_dist.sh.log
stratos_version=4.1.4
stratos_rc_version=${stratos_version}-rc2
source_path=https://dist.apache.org/repos/dist/dev/stratos/${stratos_rc_version}
echo "Downloading source release..." | tee -a ${log}
wget ${source_path}/apache-stratos-source-release-${stratos_version}.zip
wget ${source_path}/apache-stratos-source-release-${stratos_version}.zip.asc
@imesh
imesh / verify-stratos-release.sh
Created May 5, 2014 04:39
Verify signatures and hash values of a Stratos release
#!/bin/sh
md5=".md5"
sha1=".sha1"
asc=".asc"
for f0 in *.zip
do
echo $f0
f2=$f0$md5