Skip to content

Instantly share code, notes, and snippets.

View paulrobinson's full-sized avatar

Paul Robinson paulrobinson

  • Red Hat
  • Whitley Bay, UK
View GitHub Profile
@paulrobinson
paulrobinson / 1_OnServiceRequest.java
Created June 5, 2012 12:58
@CompensatedBy discussion
@AT
class MyService
{
@ServiceRequest
@ATTriggers({ @ATTrigger(lifecycleEvent=ATLifecycleEvent.PRPEARE,
methodName="prpeareBooking")
@ATTrigger(lifecycleEvent=ATLifecycleEvent.COMMIT,
methodName="commitBooking")
@ATTrigger(lifecycleEvent=ATLifecycleEvent.ROLLBACK,
methodName="rollbackBooking") })
@paulrobinson
paulrobinson / wsat-ssl.asciidoc
Last active December 19, 2015 21:18
Instructions for how to configure XTS to use SSL.

tab 1

unzip ~/Downloads/jboss-eap-6.1.0.zip
mv jboss-eap-6.1 jboss-eap-6.1-client
cp -r jboss-eap-6.1-client jboss-eap-6.1-server
git clone git://github.com/jboss-jdf/jboss-as-quickstart.git
cd jboss-as-quickstart/wsat-simple/

Now use the following instructions to replace http urls with https urls, and change the destination IP.

#!/bin/bash
git remote | grep upstream > /dev/null 2>&1
if [ "$?" -ne 0 ]; then
echo This script assumes you have upstream set as the repo to hand reqs in
exit
fi
if [ ! -d .git ]; then
echo This script assumes you are in the root of a repo clone
exit
#!/bin/bash
git remote | grep origin > /dev/null 2>&1
if [ "$?" -ne 0 ]; then
echo This script assumes you have origin set as the repo to create reqs in
exit
fi
upstreamname=`git remote -v | grep upstream | grep fetch | sed "s#upstream.*github.com[:/]\(.*\)/.*#\1#"`
reponame=`git remote -v | grep origin | grep push | sed "s#.*/\(.*\)\.git.*#\1#g"`
myname=`git remote -v | grep origin | grep fetch | sed "s#origin.*github.com[:/]\(.*\)/.*#\1#"`
Gemfile
Gemfile.lock
README.md
Rakefile
_brms-quickstarts
_brms-quickstarts/.git
_brms-quickstarts/.gitignore
_brms-quickstarts/business-resource-planner
_brms-quickstarts/business-resource-planner/pom.xml
_brms-quickstarts/business-resource-planner/README.md
05acf2b51aa474e55b1c9514007c092c ./_tmp/cdn/stylesheets/all-23.css
05acf2b51aa474e55b1c9514007c092c ./stylesheets/app.css
5afa64aee8f1a8cce271613692a3677d ./_site/stylesheets/app.css
@paulrobinson
paulrobinson / developer-materials.js
Last active August 29, 2015 14:01
developer-materials.js
function roundHalf(num) {
var num = Math.round(num*2)/2;
var html = "";
for (var i = num; i >= 0; i--) {
if(i >= 1) {
html += "<i class='fa fa-star'></i>";
}
else if (i > 0) {
html += "<i class='fa fa-star-half-empty'></i>";
}
/** DCP HELPERS **/
app.dcp.getNameFromContributor = function( contributor ) {
return contributor.substring(0, contributor.lastIndexOf("<") - 1);
};
/**
* Load a document from the DCP, resolve any contributors, and replace any
* span.contributor[data-sys-contributor=<contributor>] elements in the current page
*/
@paulrobinson
paulrobinson / test-e.sh
Last active August 29, 2015 14:02
Demonstrates "bash -e"
#!/bin/bash -e
echo 1
echo 2
ls /tmp/dadsadfssadasdda
echo 3
#!/bin/bash
USER=$1
HOST=$2
if [ "$HOST" == "" ]; then
echo "usage: $0 <user name> <host name>"
exit 0
fi