- Place configs under
~/.kube/contexts
, i.e.
$ tree ~/.kube/contexts
/Users/jon/.kube/contexts
├── config-dev
# 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) }' | |
# .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); |
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() + "!"); | |
} | |
} |
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) { | |
} |
I hereby claim:
To claim this, I am signing this object:
package main | |
import ( | |
"strings" | |
"golang.org/x/tour/wc" | |
) | |
func WordCount(s string) map[string]int { | |
counts := make(map[string]int) | |
@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); |
// 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) |