Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
; is so overrated

Max Rydahl Andersen maxandersen

💭
; is so overrated
View GitHub Profile
View gist:5d6f6f2e30f12da7bf064b32548d96fb
jbang -m org.jbake.launcher.Main --deps info.picocli:picocli:RELEASE,org.eclipse.jetty:jetty-server:RELEASE,org.apache.commons:commons-vfs2:RELEASE --java 17 org.jbake:jbake-core:RELEASE --help
View Main.java
//DEPS io.micronaut:micronaut-http-server-netty:3.5.2
//DEPS org.slf4j:slf4j-simple:1.6.1
//DEPS io.micronaut:micronaut-http-client:3.5.2
//DEPS io.micronaut:micronaut-inject-java:3.5.2
//SOURCES MicroController.java
//JAVA 17+
package jbang.test;
import io.micronaut.runtime.Micronaut;
View 0.100.txt
rm -rf ~/.jbang/bin/jbang* && curl -Ls https://sh.jbang.dev | JBANG_DOWNLOAD_VERSION=0.100.0 bash -s - app setup && jbang --fresh --verbose --java 17 -DPSWD=c6fa_41b6_9f2b quarkusclidb.java
Downloading JBang 0.100.0...
Installing JBang...
[jbang] JBang environment is already set up.
[jbang] jbang version 0.100.0
[jbang] Building as fresh build explicitly requested.
[jbang] System Java version detected as 17
[jbang] System Java version matches requested version 17
[jbang] Repositories: mavencentral=https://repo1.maven.org/maven2/
[jbang] Resolving dependencies...
View fifa.dash.yaml
properties:
GoalsFunction: AVERAGE
SeriesColor: cyan
global:
mode: dark
settings:
extraConfiguration: >-
{
"color": "${SeriesColor}"
}
View fifa.dash.yaml
properties:
GoalsFunction: AVERAGE
SeriesColor: cyan
global:
mode: dark
settings:
extraConfiguration: >-
{
"color": "${SeriesColor}"
}
View yamo.java
///usr/bin/env jbang "$0" "$@" ; exit $?
//JAVA 17+
//DEPS com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.0
import static java.lang.System.out;
import java.io.IOException;
import com.fasterxml.jackson.core.type.TypeReference;
View t.yaml
///usr/bin/env jbang --quiet camel@apache/camel pipe "$0" "$@" ; exit $?
---
# camel-k: language=yaml
# Will upper-case the input
- from:
uri: "stream:in"
steps:
- setBody:
simple: "${body.toUpperCase()}"
View gist:223449135cb1edf415c4038edce8985a
2022-11-25 08:06:57,415 [ 25687] SEVERE - #c.i.o.a.i.ActionUpdater - OpenInBrowserEditorContextBarGroupAction#getChildren@ContextToolbar (com.intellij.ide.browsers.actions.OpenInBrowserBaseGroupAction$OpenInBrowserEditorContextBarGroupAction), actionId=OpenInBrowserEditorContextBarGroupAction, text='Open in Browser'
java.lang.NullPointerException
at com.intellij.util.SVGLoader.loadFromClassResource(SVGLoader.kt:117)
at com.intellij.util.ImageLoader.loadByDescriptorWithoutCache(ImageLoader.java:264)
at com.intellij.util.ImageLoader.loadByDescriptor(ImageLoader.java:223)
at com.intellij.util.ImageLoader.loadImage(ImageLoader.java:154)
at com.intellij.openapi.ui.ImageDataByPathLoader.loadImage(ImageDataByPathLoader.kt:89)
at com.intellij.openapi.util.IconLoader$CachedImageIcon.loadImage(IconLoader.java:979)
at com.intellij.openapi.util.IconLoader$ScaledIconCache.getOrScaleIcon(IconLoader.java:1048)
at com.intellij.openapi.util.IconLoader$CachedImageIcon.getRealIcon(IconLoader.java:866)
@maxandersen
maxandersen / lol.java
Created November 24, 2022 11:17 — forked from fbricon/lol.java
JFiglet + Lolcat with JBang
View lol.java
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS com.github.jamesnetherton:lolcat4j:0.4.0
//DEPS com.github.lalyos:jfiglet:0.0.9
import java.io.IOException;
import com.github.jamesnetherton.lolcat4j.Lol;
import com.github.lalyos.jfiglet.FigletFont;
public class lol {
View gist:7c253c7c30ce3fb959f00aa412bf98d4
///usr/bin/env jbang "$0" "$@" ; exit $?
//JAVA 17+
//DEPS com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.0
import static java.lang.System.*;
import java.io.IOException;
import com.fasterxml.jackson.databind.ObjectMapper;