This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Using Spring to create a reader. Should be easy to write this yourself. | |
//file is the xml response you got stripped of SoapEnvelope and SoapBody. | |
def classpathResource: ClassPathResource = new ClassPathResource(file) | |
def inputStream: InputStream = classpathResource.getInputStream() | |
def xmlInputFactory: XMLInputFactory = XMLInputFactory.newInstance() | |
def xmlReader: XMLStreamReader = xmlInputFactory.createXMLStreamReader(inputStream) | |
//ObjectFactory you can find in your jax ws generated code | |
val instance: JAXBContext = JAXBContext.newInstance(classOf[ObjectFactory]) | |
val unmarshaller: Unmarshaller = instance.createUnmarshaller() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://javadoc.jenkins-ci.org/ | |
/* | |
* Script for upping the minor version of the starting job, named ARTIFACT_PROJECT | |
* We expect every version to arrive here following this version strategy: major.minor | |
*/ | |
import hudson.model.* | |
import jenkins.model.Jenkins | |
//Get the parameters | |
def originalVersion = build.buildVariableResolver.resolve("VERSION") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hubot: | |
build: . | |
restart: always | |
links: | |
- redis:redis | |
environment: | |
HUBOT_SLACK_TOKEN: <magic-token-here> | |
data: | |
image: redis | |
command: /bin/true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log `git describe --tags --abbrev=0`..HEAD --format=%s | grep -o "^\w*-\d*" | sort | uniq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
testCompile "junit:junit-dep:4.11" | |
testCompile "info.cukes:cucumber-scala_2.10:1.2.2"//TODO: Can be deleted? | |
testCompile "info.cukes:cucumber-core:1.2.2" | |
testCompile 'info.cukes:cucumber-java:1.2.2' | |
testCompile "info.cukes:cucumber-junit:1.2.2" //TODO: Not needed? | |
//If you'd like some dependencies | |
testCompile 'info.cukes:cucumber-spring:1.2.2' | |
testCompile 'org.springframework:spring-test:4.0.5.RELEASE' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SensorTag = require('sensortag'); | |
connect_and_enable_humidity = function(sensorTag){ | |
console.log('discovered %s', sensorTag); | |
sensorTag.connect(function() { | |
console.log('connected'); | |
sensorTag.discoverServicesAndCharacteristics(function() { | |
console.log('Discovering services') | |
sensorTag.enableIrTemperature(function(){ | |
sensorTag.on('irTemperatureChange', function(objectTemperature, ambientTemperature){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# SUSE system statup script for Jenkins | |
# Copyright (C) 2007 Pascal Bleser | |
# | |
# This library is free software; you can redistribute it and/or modify it | |
# under the terms of the GNU Lesser General Public License as published by | |
# the Free Software Foundation; either version 2.1 of the License, or (at | |
# your option) any later version. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GitContext { | |
@Lazy String branchName = { | |
def proc = 'git rev-parse --abbrev-ref HEAD'.execute() | |
proc.waitFor() | |
assert proc.exitValue() == 0, proc.err.text | |
return proc.in.text.trim() | |
}() | |
def boolean isMasterBranch() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# User specific aliases and functions | |
export LANG="no_NO.UTF-8" | |
export LC_CTYPE="no_NO.UTF-8" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install -y python-dev python-pip python-gevent libevent-dev libzmq-dev | |
sudo pip install pyzmq gevent-zeromq locustio |