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 com.intellij.lang.Language | |
import com.intellij.lang.documentation.DocumentationSettings | |
import com.intellij.lang.documentation.DocumentationSettings.InlineCodeHighlightingMode.NO_HIGHLIGHTING | |
import com.intellij.lang.documentation.DocumentationSettings.InlineCodeHighlightingMode.SEMANTIC_HIGHLIGHTING | |
import com.intellij.openapi.editor.HighlighterColors | |
import com.intellij.openapi.editor.colors.EditorColorsManager | |
import com.intellij.openapi.editor.richcopy.HtmlSyntaxInfoUtil | |
import com.intellij.openapi.fileTypes.PlainTextLanguage | |
import com.intellij.openapi.project.Project | |
import com.intellij.openapi.util.text.StringUtil |
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
/* | |
* DiscusToGiscus.java | |
* | |
* Copyright (c) 2021,today - Brice Dutheil <brice.dutheil@gmail.com> | |
* | |
* This Source Code Form is subject to the terms of the Mozilla Public | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | |
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
*/ | |
///usr/bin/env jbang "$0" ; exit $? |
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
/* | |
* Stonks.java | |
* | |
* Copyright (c) 2021,today - Brice Dutheil <brice.dutheil@gmail.com> | |
* | |
* This Source Code Form is subject to the terms of the Mozilla Public | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | |
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
*/ | |
///usr/bin/env jbang "$0" ; exit $? |
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.io.IOException; | |
import java.io.InputStream; | |
import java.io.UncheckedIOException; | |
import java.net.URI; | |
import java.net.http.HttpClient; | |
import java.net.http.HttpRequest; | |
import java.net.http.HttpResponse; | |
import java.time.Duration; | |
import java.time.temporal.ChronoUnit; | |
import java.util.function.Function; |
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.awt.*; | |
import java.awt.event.MouseEvent; | |
import java.util.Objects; | |
import javax.swing.*; | |
import javax.swing.event.MouseInputAdapter; | |
import javax.swing.table.DefaultTableModel; | |
import javax.swing.table.TableCellEditor; | |
import javax.swing.table.TableColumn; | |
public final class InteractiveTableCellsMain extends JPanel { |
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
/* | |
* GraalJsDemo.java | |
* | |
* Copyright (c) 2021,today - Brice Dutheil <brice.dutheil@gmail.com> | |
* | |
* This Source Code Form is subject to the terms of the Mozilla Public | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | |
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
*/ | |
///usr/bin/env jbang "$0" ; exit $? |
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
Homebrew build logs for bric3/tap/async-profiler on macOS 12.3 | |
Build date: 2022-05-17 16:03:41 |
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
val fireplaceLocation = extra.has("fireplaceLocation").let { | |
if (it) extra.get("fireplaceLocation") as String | |
else null | |
} | |
if (!fireplaceLocation.isNullOrEmpty()) { | |
val location = when { | |
fireplaceLocation.startsWith("\$HOME") || fireplaceLocation.startsWith("~") -> { | |
fireplaceLocation.replaceFirst("~|\$HOME".toRegex(), System.getProperty("user.home")) | |
} |
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
/* | |
* Registers tasks to get the dependency size | |
*/ | |
fun listConfigurationDependencies(configuration: Configuration ) { | |
val multiplier = 1024.0 | |
val formatStr = "%,10.2f" | |
val size = configuration.map { it.length() / (multiplier * multiplier) }.sum() |
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.Random; | |
/** | |
* Exponential backoff counter implementing the Full Jitter algorithm from <a href="https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/">aws</a> by Marc Brooker. | |
* | |
* <p> | |
* The idea of backoff is to introduce a delay between retries, so that client don't compete | |
* on the same resource. However it has been observed that clients may retry at the same time, | |
* thus clustering calls on the same resource. | |
* </p> |
NewerOlder