export TKN=$(curl -X POST 'http://127.0.0.1:8080/realms/your-realm/protocol/openid-connect/token' \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=your-user" \
-d 'password=your-pass' \
-d 'grant_type=password' \
This file contains hidden or 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
scheduledStartDate >= formValues.scheduledEndDate ? // Put the ? on the next line there is no nested ternary | |
"Needs to be before the scheduled end date" | |
: true, | |
// I don't seriously dislike this, I could live with this since it makes it more consistent I suppose |
This file contains hidden or 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
export const riskLevelNumberToColorScheme = (s: number) => | |
s === 1 ? "blue" | |
: s === 2 ? "teal" | |
: s === 3 ? "purple" | |
: s === 4 ? "yellow" | |
: /* else */ "red" |
This file contains hidden or 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 se.foo.bar; | |
import java.util.Optional; | |
import java.util.function.Function; | |
import java.util.function.Supplier; | |
import java.util.stream.Stream; | |
interface Either<L, R> { | |
<T> T either(Function<L, T> left, Function<R, T> right); |
This file contains hidden or 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
import java.util.List; | |
import java.util.Objects; | |
import java.util.function.Function; | |
import java.util.function.Predicate; | |
import java.util.stream.Collectors; | |
import java.util.stream.Stream; | |
class Scratch { | |
public static void main(String[] args) { | |
System.out.println(getCertainThings()); |
This file contains hidden or 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
alias resp='echo -e "\033]50;SetProfile=Default\a"' |
This file contains hidden or 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
class Movie { | |
enum Type { | |
REGULAR(PriceService::getRegularPrice), | |
NEW_RELEASE(PriceService::getNewReleasePrice), | |
CHILDREN(PriceService::getChildrensPrice); | |
public final BiFunction<PriceService, Integer, Double> priceAlgo; | |
private Type(BiFunction<PriceService, Integer, Double> priceService) { |
This file contains hidden or 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
import sys | |
import logging | |
from .config import LOG_LEVEL | |
def setup_logging(): |
This file contains hidden or 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
const I = x => x; | |
const K = x => y => x; | |
const A = f => x => f(x); | |
const T = x => f => f(x); | |
const W = f => x => f(x)(x); | |
const C = f => y => x => f(x)(y); | |
const B = f => g => x => f(g(x)); | |
const S = f => g => x => f(x)(g(x)); | |
const P = f => g => x => y => f(g(x))(g(y)); | |
const Y = f => (g => g(g))(g => f(x => g(g)(x))); |
NewerOlder