Skip to content

Instantly share code, notes, and snippets.

View remen's full-sized avatar

Petter Remen remen

  • Gothenburg
  • 19:22 (UTC +02:00)
View GitHub Profile

The challenge of keeping Backstage up-to-date, is that it is meant as a template for a developer portal, supported by a platform of standardized plugins. Although it is fairly easy to bump the dependencies for the plugins, one also have to update the template, which becomes more and more difficult as changes are made locally. To solve for this, the official documentation recommends that upgrades are made in the following order:

  1. Bump dependencies using yarn backstage-cli versions:bump
  2. Read the @backstage/create-app changelog and/or use the Backstage upgrade helper to modify the code generated by the initial template.

Our approach

#!/bin/sh
# Example usage:
# $ searchmaven rxjava
# io.reactivex:rxjava:1.1.5
# org.wildfly.swarm:rxjava:1.0.0.Alpha8
# com.artemzin.rxjava:proguard-rules:1.1.5.0
# ...
http "http://search.maven.org/solrsearch/select?q=$1" | jq -r '.response.docs | map([.id,.latestVersion] | join(":")) | .[]'
@remen
remen / fun_with_kotlin_and_jackson.kt
Last active October 17, 2021 08:59
Fun with kotlin and jackson
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.KotlinModule
fun main(args: Array<String>) {
val jsonString : String = """
{
"authors" : [
{
"name" : "Kalle Jönsson",
@remen
remen / gist:31e798670783261c8a93
Last active October 31, 2023 15:44
Run shell command in groovy
/**
* Runs commands using /bin/sh and returns stdout as string
*
* <p>
* If the exit code of the command is non-zero, the stderr of the command is printed to stderr
* and a RuntimeException will be thrown.
* </p>
* <b>Example</b>
* <pre><code>
* def files = sh('ls $HOME').split()
@remen
remen / IteratorWrapper.java
Created September 13, 2012 14:35
IteratorWrapper
package com.example;
import java.util.Iterator;
/**
*
* Usage:
* You have a method that returns an iterator (I'm looking at you org.apache.commons.io.FileUtils.lineIterator !!!)
* but you want to use the snazzy for-syntax. Look no further:
*
* import static IteratorWrapper.iterable;