Skip to content

Instantly share code, notes, and snippets.


Friedrich "Fred" Clausen ftclausen

View GitHub Profile
ftclausen / jenkins-pipeline-mocks.groovy
Last active Feb 25, 2020
Jenkins pipeline very simple mock steps to test things in a standalone script
View jenkins-pipeline-mocks.groovy
# For a more realistic simulation see
def readFile( Map args ) {
def file = args.file
def encoding = args.file ?: 'UTF-8'
return new File( file ).text
def sh( String command ) {
# List all files in all restic snapshots
restic -r $repo --password-file $passwd_file snapshots -c | awk '/^[0-9a-f]{8}/ {print $1}' | while read -r snap; do
restic -r $repo --password-file $passwd ls $snap
ftclausen /
Last active Jun 11, 2019
#!/usr/bin/env bash
# Friedrich "Fred" Clausen -
source_directories=("/var/tmp/inc_test" "/var/tmp/inc test 2")
log="$(mktemp -t backup_report_)"
ftclausen / Jenkinsfile
Created Apr 13, 2017
Jenkins pipeline - An approach to get all commits since the last successful build.
View Jenkinsfile
// -*- mode: groovy -*-
// vim: set filetype=groovy :
node( 'some_node' ) {
stage( "Phase 1" ) {
sshagent( credentials: [ 'some_creds' ] ) {
checkout scm
def lastSuccessfulCommit = getLastSuccessfulCommit()
def currentCommit = commitHashForBuild( currentBuild.rawBuild )
if (lastSuccessfulCommit) {

Keybase proof

I hereby claim:

  • I am ftclausen on github.
  • I am ftclausen ( on keybase.
  • I have a public key ASAe4Q4yjdm6jeLJIgcWfY6K0pxqWk8vSLROpSyh25g5Vgo

To claim this, I am signing this object:

ftclausen / khan_academy_recursion_project_l_systems.js
Last active Sep 2, 2016
Attempt at generating an L-System based pythagoras-like tree
View khan_academy_recursion_project_l_systems.js
var maxIterations = 3;
var currentIteration = 0;
var pythagorasTree = function(string, subIteration) {
// Because processing JS does not seem to like default parameters
if (!subIteration) {
currentIteration += 1;
if (currentIteration > maxIterations) {
println("Reached max iterations");
View ka_recursion_homework.js
// KA recursion homework assignment. Does a poor man's tunnel animation.
// Also at
// drawShape() will draw a series of circles, each one
// smaller than the last until we hit a radius of 7 or less
var drawShape = function(x, y, radius) {
// The base case - quit when we have a radius of 7
if (radius <= 7) {
View jenkins-windows-slave.log
Connecting to
Checking if Java exists
java -version returned 1.8.0.
Installing the Jenkins slave service
Copying jenkins-slave.exe
Copying slave.jar
Copying jenkins-slave.xml
Registering the service
Starting the service
Waiting for the service to become ready
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gradle_2.2_versus_2.3_EclipsePlugin.diff
diff --git a/subprojects/ide/src/main/groovy/org/gradle/plugins/ide/eclipse/EclipsePlugin.groovy b/subprojects/ide/src/main/groovy/org/gradle/plugins/ide/eclipse/EclipsePlugin.groovy
index e6356d3..d7eecf7 100644
--- a/subprojects/ide/src/main/groovy/org/gradle/plugins/ide/eclipse/EclipsePlugin.groovy
+++ b/subprojects/ide/src/main/groovy/org/gradle/plugins/ide/eclipse/EclipsePlugin.groovy
@@ -43,7 +43,6 @@ class EclipsePlugin extends IdePlugin {
static final String ECLIPSE_JDT_TASK_NAME = "eclipseJdt"
private final Instantiator instantiator
- EclipseModel model
You can’t perform that action at this time.