Skip to content

Instantly share code, notes, and snippets.

@magnuspalmer
magnuspalmer / request.groovy
Created August 22, 2016 17:31
Simple Groovy SOAP request using wslite
@Grab(group='com.github.groovy-wslite', module='groovy-wslite', version='1.1.0')
import wslite.soap.*
import groovy.xml.*
def client = new SOAPClient('http://www.webservicex.net/globalweather.asmx')
String city = 'Stockholm'
String country = 'Sweden'
def weatherResponse = client.send(){
@magnuspalmer
magnuspalmer / install-docker.sh
Created September 2, 2016 13:22
Install a specific version inside jenkins docker image
echo deb http://http.debian.net/debian wheezy-backports main > /etc/apt/sources.list.d/backports.list
apt-get update
apt-get install -y apt-transport-https ca-certificates
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo deb https://apt.dockerproject.org/repo debian-jessie main > /etc/apt/sources.list.d/docker.list
apt-get update
#Show the available versions for package docker-engine
#apt-cache showpkg docker-engine
apt-get install docker-engine=1.11.2-0~jessie
@magnuspalmer
magnuspalmer / rancher-setup-windows.md
Created September 22, 2016 09:33
Rancher scratchpad

Setup Rancher on windows for fun and work (and probably Linux as well)

Create a network - ranchernet

docker network create --subnet 173.18.0.0/16 ranchernet

Start the server, use the ranchernet and assign static IP

docker run -d --restart=always --net ranchernet --ip=173.18.0.2 -p 8080:8080 rancher/server

Through the Rancher UI, get the command, but add it also to the rancher net and give static ip

docker run -e CATTLE_AGENT_IP="173.18.0.3" --net ranchernet --ip 173.18.0.3 -d --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.0.2 http://173.18.0.2:8080/v1/scripts/

@magnuspalmer
magnuspalmer / keybase.md
Created March 9, 2019 12:09
keybase.md

Keybase proof

I hereby claim:

  • I am magnuspalmer on github.
  • I am magnuspalmer (https://keybase.io/magnuspalmer) on keybase.
  • I have a public key ASDSh24DedbIwzGQDyIEmISe4-mcDIpbRxMq3B_M1Rt3Two

To claim this, I am signing this object: