Skip to content

Instantly share code, notes, and snippets.

View lefou's full-sized avatar

Tobias Roeser lefou

View GitHub Profile
@lefou
lefou / Mill_Plugin_Matrix.adoc
Last active April 26, 2023 14:16
Matrix of Mill Plugins and their supported Mill versions
@lefou
lefou / build_eclipse.sc
Last active December 22, 2021 16:57
Eclipse Bundles 4.16
import scala.collection.immutable.Seq
import mill.scalalib._
/**
* Defines an Archive file (ZIP, ...) than can be downloaded from a given URL.
* The bundle must be location inside the archive with the schematic name `${artifactId}_${version}.jar`.
* Source bundles must have the schematic name `${artifactId}.source_${version}.jar`.
*
* @param url
@lefou
lefou / gk
Created November 6, 2020 09:30
gitk wrapper that also includes all stashes
#!/usr/bin/env sh
if [ "x$@" = "x" ] ; then
gitk --all `git stash list '--pretty=format:%gd'` &
else
gitk "$@" &
fi
@lefou
lefou / 2020-09-12_07-02_Sat-Orbit-360-Sachsen.gpx
Last active September 15, 2020 07:34
2020-09-12 Bikepacking Tour Orbit 360 - Sachsen - https://orbit360.cc/sachsen/
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<gpx version="1.1" creator="OsmAnd~ 3.7.4" xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<metadata>
<name>2020-09-12_07-02_Sat</name>
</metadata>
<trk>
<trkseg>
<trkpt lat="51.0655571" lon="13.7425885">
<ele>101.007</ele>
<time>2020-09-12T05:02:10Z</time>
@lefou
lefou / rmvn
Last active November 6, 2020 09:32
mvn wrapper that runs maven from the project top directory with `-pl {cwd}`
#!/usr/bin/env bash
basedir=
dirname=
found=0
# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
@lefou
lefou / mvn-release.scala
Created March 12, 2018 13:15
Mave Polyglot Scala file meant to be included in projects
// You should include this file from your pom.scala
// In your pom.scala (or somewhere else) you must define
// - a Deps object with the required dependencies
// - a Plugins object with the required plugin dependencies
import org.sonatype.maven.polyglot.scala.model._
import scala.collection.immutable._
object ReleaseProfile {
@lefou
lefou / jarfind.sh
Created February 8, 2018 09:22
Find JAR files and searches their content listings for a given pattern
#!/bin/bash
# Default behavior is scan directory recursively
if [ "x$1" == "x" ]; then
echo "Find JAR files and searches their content listings for a given pattern"
echo
echo "Usage: jarfind [-l] <SEARCHTERM> [[DIR] ...]"
echo
echo "If DIRs is empty, $HOME/.m2/repository is searched."
@lefou
lefou / rmvn.sh
Created February 8, 2018 09:21
Run Maven from the project root directory with the current project pre-selected
#!/usr/bin/env bash
basedir=
dirname=
found=0
# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
@lefou
lefou / SimpleTest.java
Created November 15, 2014 10:05
Lambda Test based TestNG Suite fails under Ant
// copy this to: src/test/java/org/example/SimpleTest.java
package org.example;
import de.tobiasroeser.lambdatest.testng.FreeSpec;
class SimpleTest extends FreeSpec {{
test("1 + 1 = 2", () -> {
assertEquals(1 + 1, 2);
});