Skip to content

Instantly share code, notes, and snippets.

View dirkjot's full-sized avatar

Dirk Janssen dirkjot

View GitHub Profile
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF5J51wBEACx2PYsz49ryzK7b+7L6xc8aKtFahGo6eDCXgmFz3IJ0+vYN0HZ
Kght6udt1u0SMsi3/6cBy7P8nVtxFVGc1YUGCDkIN34Pbq1O/S9CbMDf/yhx42lt
GfhFmFv7HmNxFfIn4ICtQ1eGvTNn/wUchylxBU+2tKU+2phM0/AnzrYzVd29e1VY
kOvdpiAVbHnlXmPHWWmwwiaxlDnLad0+8JbCTWsW2laL74L1y1AumqiDxtGmDl+u
i0zV0N2G8zI2YJXLcagEvccUcTuAYtIad7QWEUNTJgI0utRPl5nfU4Rtw4QJjPO9
ZWoSWESy2E/biuPn0dsfop1IpmFcr6Yuby/rd5T+7hGBChZFhkT+rUWvLmfIovJF
zNPRgN8QXXvuBqKS8NLMyrEHqs7/zNHRVqicANHt1MQp1rtK80jhYyLl850L2Exd
fEprJHdOdchIgGDQp6WRa2UK6AqdsK+9Vc0aBIS6wtaKgAwGWaCTZNl877jmPdLj
@dirkjot
dirkjot / keybase.md
Created March 7, 2019 00:30
keybase.md

Keybase proof

I hereby claim:

  • I am dirkjot on github.
  • I am dirkjot (https://keybase.io/dirkjot) on keybase.
  • I have a public key ASCKXf4VGilTgWRsJMAymvGAZOICxSfapdiIYUwZN0KyHAo

To claim this, I am signing this object:

@dirkjot
dirkjot / README.txt
Created November 22, 2017 19:08
Python workshop part 2: Objects and list comprehension
This code is not complete: One of the tests currently fails and the Transaction class is not used. Can you fix it?
@dirkjot
dirkjot / mergetree.py
Created October 12, 2017 20:44
Using lmxl/etree to merge two xml trees
from lxml import etree
from copy import deepcopy
"""
This is an attempt to merge to XML trees. It works but it probably doesn't do what you want because XML elements are not only identified
by their tag. Take a POM for example, it will have many <dependency> nodes that are only distinguished by the text on their daughter
node 'GroupId'. This code does not take that into account.
"""
def treeMerge(a, b):
@dirkjot
dirkjot / jenkins-plugins-batch-install.md
Created May 7, 2017 16:55 — forked from hgomez/jenkins-plugins-batch-install.md
Mass install/update of Jenkins Plugins

Scripted Jenkins Plugins install

Jenkins has a very rich catalog of plugins and it's quite easy to install and update them via UI. BTW, when you want to add tons of plugin via UI, it's a fairly long and boring procedure.

Hopefully, mass installation (or update) could be easy using a simple bash script (curl/python required) :

Create a file containing plugins to be installed (or updated), ie iplugins :

@dirkjot
dirkjot / copy_env.py
Created March 23, 2017 15:31
Copying configuration property files into mule-app.properties for deployment to Mulesoft MMC
#!/usr/bin/env python
"""
Copy env from config file to mule-app.properties, this is useful for deploying to an MMC. On cloudhub, you can set a
variable (mule.env) to determine which property file will be loaded but on MMC this does not work. This deployment script
may help.
Dirk P. Janssen
Spring 2017
"""
@dirkjot
dirkjot / Person.groovy
Created March 1, 2017 06:06
Using junit4 with Groovy
// based on groovy docs
class Person {
String first, last
}
class Family {
Person father, mother
def nameOfMother() { "$mother.first $mother.last" }
#!/bin/sh
# inspired by this SO answer by Uwe Geuder
# http://stackoverflow.com/questions/277546/can-i-use-git-to-search-for-matching-filenames-in-a-repository/6960138#6960138
# this will create one 'foundin-$rev.txt' file for each of your revisions, feel free to delete them after use
# ADJUST THIS TO YOUR NEEDS:
SEARCHTERM="file-that-was-long-lost.txt"
@dirkjot
dirkjot / image location
Last active August 29, 2015 14:10
in a kivy scatter with background image, only part of the image is dragable
Images to go with this are on google drive
==========================================
boring-bg.jpg
big background image (almost 800Kb), no useful content but created similarly to our actual backgrounds
https://drive.google.com/file/d/0B7pjQZ7_MEk5M2o0WlFuX2YzNDQ/view?usp=sharing