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
handlers= java.util.logging.ConsoleHandler | |
java.util.logging.ConsoleHandler.level = FINEST | |
sun.net.www.protocol.http.HttpURLConnection.level=ALL |
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
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS info.picocli:picocli:4.5.0 | |
//DEPS io.smallrye.reactive:smallrye-mutiny-vertx-web-client:1.2.1 | |
//DEPS io.quarkus.qute:qute-core:1.8.2.Final | |
package com.gihub.mkouba; | |
import picocli.CommandLine; | |
import picocli.CommandLine.Command; | |
import picocli.CommandLine.Parameters; |
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
///usr/bin/env curl -LSs https://sh.jbang.dev | bash -s - "$0" "$@"; exit $? | |
//DEPS org.springframework.boot:spring-boot-starter-web:2.3.4.RELEASE | |
import org.springframework.web.bind.annotation.*; | |
import org.springframework.boot.*; | |
import org.springframework.boot.autoconfigure.*; | |
import org.springframework.context.*; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.web.bind.annotation.RestController; | |
import org.springframework.context.annotation.*; |
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 static void main(String[] args) { | |
Stream.of(Boolean.class, Byte.class, Character.class, Short.class, Integer.class, | |
Long.class, Float.class, Double.class, Void.class).map(c -> { | |
try { | |
return c.getField("TYPE").get(null); | |
} catch (Exception e) { | |
throw new AssertionError(e); | |
} | |
}).forEach(System.out::println); | |
} |
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
import PropTypes from 'prop-types'; | |
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>; | |
type Defined<T> = T extends undefined ? never : T; | |
/** | |
* Get the type that represents the props with the defaultProps included. | |
* | |
* Alternatively, we could have done something like this: |
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
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS io.micronaut:micronaut-bom:2.5.4@pom | |
//DEPS io.micronaut:micronaut-http-server-netty | |
//DEPS io.micronaut:micronaut-inject-java | |
//DEPS org.slf4j:slf4j-simple | |
package app; | |
import io.micronaut.http.annotation.*; | |
import io.micronaut.runtime.Micronaut; |
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
sudo apt-get install libgmp-dev libmpfr-dev libmpc-dev g++-multilib mercurial texinfo | |
hg clone http://hg.openjdk.java.net/jdk8u/jdk8u | |
cd jdk8u | |
hg update jdk8u92-b14 | |
sed -ri 's/subrepos="[^"]+"/subrepos="hotspot"/' ./make/scripts/hgforest.sh # only get hotspot | |
sed -ri 's/subrepos="[^"]+"/subrepos="hotspot"/' ./common/bin/hgforest.sh # only get hotspot | |
chmod +x ./get_source.sh; ./get_source.sh | |
cd hotspot/src/share/tools/hsdis | |
wget http://ftp.heanet.ie/mirrors/ftp.gnu.org/gnu/binutils/binutils-2.26.tar.gz | |
tar -xzf binutils-2.26.tar.gz |
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
/* | |
* MIT License | |
* | |
* Copyright (c) 2021 Brice Dutheil <brice.dutheil@gmail.com> | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
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
import java.util.Comparator; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.Set; | |
import java.util.stream.Collectors; | |
import java.util.stream.IntStream; | |
// See https://twitter.com/tagir_valeev/status/1402089474805354499 | |
public class StringBuilderHash { |
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
# vim: filetype=neomuttrc | |
# Default index colors: | |
color index yellow default '.*' | |
color index_author red default '.*' | |
color index_number blue default | |
color index_subject cyan default '.*' | |
# For new mail: | |
color index brightyellow black "~N" | |
color index_author brightred black "~N" |
OlderNewer