Skip to content

Instantly share code, notes, and snippets.

Christoph Burgmer cburgmer

Block or report user

Report or block cburgmer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
cburgmer / concourse-proxy.js
Last active May 10, 2019
Concourse CI 5 supports CC.XML. This is a proxy for unauthorised access to that new API.
View concourse-proxy.js
#!/usr/bin/env node
// Concourse CI 5 supports CC.XML
// This small program will allow unauthorised access to the new API, while we
// figure out how to get existing monitors on to OAuth and friends.
const concourseUrl = 'http://localhost:8080';
const port = 8081;
const flyTarget = 'proxy';
const flyExecutablePath = 'fly';
cburgmer /
Created Jan 6, 2019
Scan two sided documents with a one-side only scanner
readonly TMP_DIR="/tmp/rearrange_double_sided_scan.$$"
pages_rearranged() {
local dir="$1"
local count
count=$(( $(ls "$dir" | wc -l) / 2 ))
paste -d '\n' \
cburgmer / example.js
Last active Nov 11, 2017
Mock Document for Google Apps Scripts, this implements a partial interface of
View example.js
var doc = fakeDocument(
aParagraph('some text'),
// => 2
// => 'some text'
import os
import sys
import requests
import json
REPOSITORY_PR = 'https://{{ your corporate server }}/rest/api/1.0/projects/{{ your project }}/repos/{{ your repo }}/pull-requests?state=OPEN'
SLACK_CHANNEL = '#{{ your channel }}'
cburgmer /
Last active Aug 29, 2015
How to join JUnit XML files when all you have is basic Unix commands
# For test cases wrapped with <testsuites>. For a single <testsuite> adapt accordingly.
find . -name "*.xml" -exec cat {} \; \
| sed "/<\?xml [^>]*\?>/d" | sed "/<\/*testsuites>/d" \
| (echo '<?xml version="1.0" encoding="UTF-8"?>' && echo '<testsuites>' && cat && echo '</testsuites>') \
> joined_xml
mv joined_xml joined.xml # Avoid the output being mixed up with the input
cburgmer / gist:87f520a66f083a9deed8
Created Jan 12, 2015
CSS Critic reporter to find offending pixels
View gist:87f520a66f083a9deed8
reportComparison: function (comparison) {
if (imagediff.equal(comparison.pageImage, comparison.referenceImage)) {
var d = imagediff.diff(comparison.pageImage, comparison.referenceImage, {align: 'top'}).data;
var pixelDiff = [], i;
for (i=0; i < d.length; i += 4) {
if (d[i] !== 0 || d[i+1] !== 0 || d[i+2] !== 0 || d[i+3] !== 255) {
pixelDiff.push([d[i], d[i+1], d[i+2], d[i+3]]);
View debuggablePromises.js
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(['ayepromise'], factory);
} else if (typeof exports === 'object') {
module.exports = factory(require('ayepromise'));
} else {
root.ayepromise = factory(root.ayepromise);
}(this, function (ayepromise) {
'use strict';
cburgmer / install.txt
Created Jul 11, 2014
Take a screenshot with selenium from node
View install.txt
npm install selenium-webdriver
npm install selenium-server-standalone-jar
npm install phantomjs
cburgmer / ng-i18next-filter.js
Created Oct 18, 2013
Simple i18next translation filter for angular This solves async issues with the filter accessing the translation function before i18next is ready. The solution here is not optimal but clearly maps out the solution, something that or fails …
View ng-i18next-filter.js
.run(['$rootScope', function ($rootScope) {
window.i18n.init(options, function () {
// When finished loading translations, trigger re-evaluation of views for translations
.filter('translate', [function(){
return function(key, params) {
// i18next needs time to initialize (loading translations). In this phase translation does not work
cburgmer / tooltip-html-unsafe.html
Created Sep 30, 2013
Minimal test case for tooltip-html-unsafe issue in AngularUI Bootstrap
View tooltip-html-unsafe.html
<!DOCTYPE html>
<html ng-app="minimalTestCase">
<meta charset="UTF-8">
<link href="//" rel="stylesheet"/>
<!--script src=""></script-->
<script src=""></script>
<script src="//"></script>
div {
You can’t perform that action at this time.