Skip to content

Instantly share code, notes, and snippets.

View maxandersen's full-sized avatar
💭
; is so overrated

Max Rydahl Andersen maxandersen

💭
; is so overrated
View GitHub Profile
dev:
quarkus dev
jshell:
#!/usr/bin/env jbang --jsh
//DEPS com.github.javafaker:javafaker:1.0.2
var faker = new com.github.javafaker.Faker();
println(faker.nation().nationality());
java:
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS org.kohsuke:github-api:1.125
import org.kohsuke.github.*;
import java.io.IOException;
import java.util.ArrayList;
///usr/bin/env jbang "$0" "$@" ; exit $?
//JAVA 17+
import static java.lang.System.*;
public class maze {
static void print(String s) {
out.println(s);
}
///usr/bin/env jbang "$0" "$@" ; exit $?
//JAVA 17+
import static java.lang.System.*;
public class maze {
static void print(String s) {
out.println(s);
}
///usr/bin/env jbang "$0" "$@" ; exit $?
//JAVA 17+
import static java.lang.System.*;
// clears the screen using ANSI escape codes
void clear_output() { out.print("\033[H\033[2J");}
var maze = new char[][] {
"######################".toCharArray(),
///usr/bin/env jbang "$0" "$@" ; exit $?
//JAVA 17+
import static java.lang.System.*;
// clears the screen using ANSI escape codes
static void clear_output() {
out.print("\033[H\033[2J");
}
///usr/bin/env jbang "$0" "$@" ; exit $?
//JAVA 17+
import static java.lang.System.*;
// clears the screen using ANSI escape codes
static void clear_output() {
out.print("\033[H\033[2J");
out.flush();
}
def can_complete_word(word, word_with_blanks):
# Remove all non-alphabetic characters from the word with blanks
word_with_blanks = ''.join(filter(str.isalpha, word_with_blanks))
# Check if the word with blanks is longer than the word
if len(word_with_blanks) > len(word):
return False
# Iterate through each letter in the word with blanks
for i, c in enumerate(word_with_blanks):
> Windup CLI 6.1.4.Final (Windup Components 6.1.4.Final) https://github.com/windup/windup
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS info.picocli:picocli:4.6.3
//DEPS com.ibm.jsonata4java:JSONata4Java:2.2.6
//DEPS com.fasterxml.jackson.core:jackson-databind:2.9.8
import static java.lang.System.out;
import java.io.IOException;
import java.nio.file.Path;