<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.zipkin.brave</groupId>
<artifactId>brave-bom</artifactId>
<version>5.6.0</version>
<type>pom</type>
<scope>import</scope>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Java 9 | |
// JDK improvements | |
Stream#takeWhile // `limit` using a predicate, i.e. `break` | |
Stream#dropWhile // `skip` using a predicate, i.e. `continue` | |
Stream#iterate // emulate a for-loop with a stream, e.g. (not previously possible) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Target({ ElementType.TYPE, ElementType.METHOD }) | |
@Retention(RetentionPolicy.RUNTIME) | |
public @interface IgnoreException { | |
Class<? extends Throwable>[] value(); | |
} | |
public class IgnoreExceptionExtension implements TestExecutionExceptionHandler { | |
@Override | |
public void handleTestExecutionException(ExtensionContext context, Throwable throwable) throws Throwable { | |
IgnoreException annotation = context.getRequiredTestMethod().getAnnotation(IgnoreException.class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"strings" | |
"golang.org/x/tour/wc" | |
) | |
func WordCount(s string) map[string]int { | |
counts := make(map[string]int) | |
I hereby claim:
- I am jon-ruckwood on github.
- I am jonruckwood (https://keybase.io/jonruckwood) on keybase.
- I have a public key ASD48-tGDeaPKLmIraDUETGDE-w5eHJnNvkHlpRX1w377go
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RecordExample { | |
public static void main(String[] args) { | |
Interval i = new Interval(1, 2); | |
System.out.println("interval: " + i); | |
} | |
record Interval(int begin, int end) { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Java14RecordExample { | |
public static void main(String[] args) { | |
var p = new Person("Boz", "Scaggs"); | |
System.out.println("toString(): " + p); | |
System.out.println("---"); | |
System.out.println("Howdy " + p.name() + "!"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/actions/composite-example/action.yaml | |
runs: | |
using: composite | |
steps: | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: "16" | |
- shell: node {0} | |
run: | | |
console.log(process.version); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires branch named in format `zz/key-1234/some-short-desc | |
# Results in commit with trailer: | |
# TASK: KEY-1234 | |
# | |
[trailer "task"] | |
key = "Task: " | |
ifExists = replace | |
ifMissing = add | |
cmd = git rev-parse --abbrev-ref HEAD | awk -F/ '{ print toupper($2) }' | |
OlderNewer